0

我有一个麻烦:使用phantomjsor chromedriver。当我使用 chromedriver 运行自动测试时,它可以正常工作,但 phantomjs 在同一脚本中抛出异常:

driver.execute_script("document.getElementById("+SelecterId+").click()")

例外文本:...

getElementById(3509082).click()\", \"args\": []}","url":"/execute","urlParsed":{"anchor":"","query":"", "文件":"执行","目录":"/","路径":"/执行","相对":"/执行","端口":"","主机":"","密码":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute","queryKey":{}," chunks":["execute"]},"urlOriginal":"/session/1f26a210-46b4-11e3-8385-173d5f6ec47a/execute"}' ; 屏幕截图:可通过屏幕获得 getElementById(3509082).click()\", \"args\": []}","url":"/execute","urlParsed":{"anchor":"","query":"", "文件":"执行","目录":"/","路径":"/执行","相对":"/执行","端口":"","主机":"","密码":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute","queryKey":{}," chunks":["execute"]},"urlOriginal":"/session/1f26a210-46b4-11e3-8385-173d5f6ec47a/execute"}' ; 屏幕截图:可通过屏幕获得 "查询":"","文件":"执行","目录":"/","路径":"/执行","相对":"/执行","端口":"","主机":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute"," queryKey":{},"chunks":["execute"]},"urlOriginal":"/session/1f26a210-46b4-11e3-8385-173d5f6ec47a/execute"}' ; 屏幕截图:可通过屏幕获得 "查询":"","文件":"执行","目录":"/","路径":"/执行","相对":"/执行","端口":"","主机":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute"," queryKey":{},"chunks":["execute"]},"urlOriginal":"/session/1f26a210-46b4-11e3-8385-173d5f6ec47a/execute"}' ; 屏幕截图:可通过屏幕获得 ,"host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute ","queryKey":{},"chunks":["execute"]},"urlOriginal":"/session/1f26a210-46b4-11e3-8385-173d5f6ec47a/execute"}' ; 屏幕截图:可通过屏幕获得 ,"host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute ","queryKey":{},"chunks":["execute"]},"urlOriginal":"/session/1f26a210-46b4-11e3-8385-173d5f6ec47a/execute"}' ; 屏幕截图:可通过屏幕获得

有任何想法如何解决这个麻烦?

4

0 回答 0