java - Selenium 2 + phantom js: unable to perform actions on a mouseover -


i'm trying perform action on button it's never done.

final actions action = new actions(mdriver);     final webelement mycart = mdriver.findelement(by.cssselector("path span"]"));     final webelement mybutton = mdriver.findelement(by.cssselector("path button"));     action.movetoelement(mycart).build().perform();     action.movetoelement(mybutton).click().build().perform(); 

this code works firefox not phantom js

i found issue here how handle mouseover in selenium 2 api or how perform mouseover function in selenium webdriver using java? nothing work phantom.

is there known workaround ?

thanks!

i had similar issues when used ghostdriver , phantomjs around year ago (fyi article). had problems ie_driver , chrome_driver too, related visibility of elements outside screen_frame (page must scrolled down).

one of serious issues upload_window , handle through already-mentioned. wasn't able achieve doh. workaround switch/cast driver on these problematic places , after complete/handle operation - switch ghostdriver. doing so, execution speed impressive.

hope helps - late given.

update:

find iwebelement process set webdriver ghostdriver firefoxdriver process iwebelement item current webdriver firefoxdriver verify expected result processing iwebelement item set webdriver firefoxdriver ghostdriver  continue workflow 

as far remember test framework implementation - basetest class takes care of initialization of used webdriver , iselenium objects. more specific case, can try this:

// create new instance of ghost driver // notice remainder of code relies on interface,  // not implementation. webdriver driver = new ghostdriver(); //do stuff until new driver needed driver = new firefoxdriver(); //do stuff new driver //'cast' after required operations have been completed , verified driver = new ghostdriver(); 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -