Firefox で正常に動作するセレン テストを実行していますが、PhantomJS を使用するとエラーが発生します。
ここに私のpythonコードがあります:
driver.find_element_by_link_text("Add Province").click()
driver.find_element_by_id("id_name").clear()
driver.find_element_by_id("id_name").send_keys("Frosinone")
driver.find_element_by_id("id_code").clear()
driver.find_element_by_id("id_code").send_keys("FR")
そして、ここに私が得ているエラーがあります:
driver.find_element_by_id("id_name").clear()
self._execute(Command.CLEAR_ELEMENT)
return self._parent.execute(command, params)
self.error_handler.check_response(response)
raise exception_class(message, screen, stacktrace)
E InvalidElementStateException: Message: u'Error Message => \'Element is not currently interactable and may not be manipulated\'\n caused by Request => {"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Length":"81","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:38159","User-Agent":"Python-urllib/2.7"},"httpVersion":"1.1","method":"POST","post":"{\\"sessionId\\": \\"e0d4d1b0-2f36-11e3-af69-b579903d9fbd\\", \\"id\\": \\":wdc:1381139859399\\"}","url":"/clear","urlParsed":{"anchor":"","query":"","file":"clear","directory":"/","path":"/clear","relative":"/clear","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/clear","queryKey":{},"chunks":["clear"]},"urlOriginal":"/session/e0d4d1b0-2f36-11e3-af69-b579903d9fbd/element/%3Awdc%3A1381139859399/clear"}' ; Screenshot: available via screen
element を見つけることができませid_name
んが、FireFox で実行すると完全に動作します。
この問題に対処する PhantomJS の現在のバグがあるかどうかは誰にもわかりませんか?
現在、Ubuntu 12.04 で Selenium 2.35.0 と PhantomJS 1.9.2 を使用しています