![](/img/trans.png)
[英]How to click on a WebElement using JavaScript using RobotFramework SeleniumLibrary in Python?
[英]Javascript syntax error in python robotframework
我正在使用機器人框架和selenium2庫。 當我嘗試使用Javascript在文本字段中設置文本時,出現以下錯誤:
'WebDriverException: Message: unknown error: Runtime.evaluate threw exception: SyntaxError: missing ) after argument list'
下面是我的功能
def jsSetTextByName(self, name, vValue):
"Setting value using java script with name"
print "document.getElementsByName('" + name + "').value='" + vValue + "'"
self.execute_javascript("document.getElementsByName('" + name + "')[0].value=('" + vValue + "')")
看起來問題出在我的python版本和chrome驅動程序上。 我已經更新了所有內容,現在看起來一切都很好。 謝謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.