0
我可以使用此地址存储网址将已存储的变量存储在Selenium IDE中
storeLocation |网址
但我想在storeLocation名称使用存储瓦尔
我想是这样的:
店| 1 | x
storeLocation | url _ $ {x}
我可以使用 - open | $ {url_1}
但是,我需要使用类似于:
open | $ {网址_ $ {X}} - 这does`t工作
我可以使用此地址存储网址将已存储的变量存储在Selenium IDE中
storeLocation |网址
但我想在storeLocation名称使用存储瓦尔
我想是这样的:
店| 1 | x
storeLocation | url _ $ {x}
我可以使用 - open | $ {url_1}
但是,我需要使用类似于:
open | $ {网址_ $ {X}} - 这does`t工作
无阵列自虐的方式(这是你想要的):
storeEval | "url" | base
storeEval | "1" | lol
storeEval | storedVars['base']+storedVars['lol'] | name
storeLocation | location
getEval | {storedVars['${name}']=storedVars['location']}
echo | ${url1}
更好的使用数组方式:
storeEval | new Array(); | url
storeLocation | location
getEval | storedVars['url'].push(storedVars['location'])
echo | javascript{storedVars['url'][0]}
的第二种变体更好,因为不需要一直创建特殊变量。你正在做更多的可读性推动阵列。访问它们也更容易 - 您可以循环访问数组。
P.S.打开页面只是使用打开,而不是回声
是的,第二种方式是为我,谢谢! –