Hi Everyone,
I want to thank everyone for all their advice and help. I really appreciate your generosity with your time and knowledge. Unfortunately, I still havenât resolved my problem. Iâm trying to put a variable in the Selector Editor.
I want to chose one of the following hyperlink sections on a web page using a variable:
I want to select one of the sections based on the value of a variable called, varSectionName, which is declared as a string and initialized with a value equal to: Strategic Management Ch., Week 3 Electronic Readings, etc.
The default sequence works correctly and clicks on âWeek 3 Electronic Readingsâ:
.
.
.
.
.
.
However, I want to replace the first Edit Attribute âWeek 3 Electronic Readingsâ with the variable varSectionName
Aksh, Vinay and others suggested:
â< webctrl aaname='â + varSectionName+ ââ parentid=âWeek3_controlâ tag=âAâ / >â
I tried to follow their suggestions, but it doesnât like the outer quotes and I get an error.
.
.
.
.
When I donât use the outer quotes and I put varSectionName in the Section Editor I get the following syntax:
.
.
.
.
The double quotes are replaced by the HTML code for double quotes.
Because it doesnât recognize varSectionName as a variable, itâs putting â+varSectionName+â into aaname as the string "+varSectionName+" and then itâs trying to locate "+varSectionName+" in the webpage.
How do I get a variable into the Selector Editor so that: and it recognizes varSectionName as âWeek 3 Electronic Readingsâ and searches for webctrl aaname=âWeek 3 Electronic Readingsâ
========
PSâŚ
I like Vikasâs suggestion of:
varSelector = ââ
varChapterName = âWeek 3 Electronic Reserve Readingsâ
Using String.format(varSelector,varChapterName) in Edit Selector window.
But I donât know how to put it in the Selector Editor either.
Thanks again for everyoneâs helpâŚ