selenium+chrome driverで動作していたものをphantomjsで動かそうとすると以下のエラーが表示されてしまいます。
C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.46.2/lib/selenium/webdriver/remote/response.rb:71:in `assert_ok': {"errorMessage":"Unable to find element with id 'hlb-view-cart-announce'","request":{"headers":{"A ccept":"application/json","Accept-Encoding":"gzip;q=1.0,deflate;q=0.6,identity;q=0.3","Connection":"close","Content-Length":"47","Content-Type":"application/json; charset=utf-8","Host":"127.0.0.1:8910","User-Agent":"Ruby "},"httpVersion":"1.1","method":"POST","post":"{\"using\":\"id\",\"value\":\"hlb-view-cart-announce\"}","url":"/element","urlParsed":{"anchor":"","query":"","file":"element","directory":"/","path":"/element","relative":" /element","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/element","queryKey":{},"chunks":["element"]},"urlOriginal":"/session/a4e47cc0-f646-11e6-ba95-5fef0bea57bc/elemen t"}} (org.openqa.selenium.NoSuchElementException) (Selenium::WebDriver::Error::NoSuchElementError)
対象のページはamazonでカートに商品を入れたあとの「カートの編集」をクリックするというところです。
こちらのコードがchrome driverでは動作するのですが、phantomjsでは動作しません。
ruby
1@driver.find_element(:id, 'hlb-view-cart-announce').click
どなたか解決方法をご教授くださいませ。
よろしくお願い致します。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/02/20 01:57