我想存储当前的URL(http://example.com)in一个变量,并用另一个字符串作为gotoIf命令gotoIf extension.js的(部分)的条件比较:当我运行这个seleniun IDESelenium IDE - 将URL字符串变量传递给条件语句“gotoIf”语句会引发语法错误?
storeLocation || url
gotoIf || ${url}=="http://example.com" || label
引发此错误:
[error] Unexpected Exception: message -> syntax error, fileName -> chrome://selenium-ide/content/tools.js -> file:///C:/Users/David%20Cunningham/Desktop/extensions_js/extensions.js, lineNumber -> 183, stack -> eval("http://example.com==\"http://example.com\"")@:0 ("http://example.com==\"http://example.com\"","label1")@chrome://selenium-ide/content/tools.js -> file:///C:/Users/David%20Cunningham/Desktop/extensions_js/extensions.js:183 ("http://example.com==\"http://example.com\"","label1")@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 ([object Object],[object Object])@chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js:310()@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:112 (6)@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:78 (6)@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 , name -> SyntaxError
storeLocation应该返回一个字符串那么为什么会出现这种错误,什么是错的语法以及如何我宣布这个命令
如果你解释你的答案会更有帮助。 – JSuar 2012-12-18 03:09:33