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…