java - Selenium testing of Hover property -
i need test alter in background color #f67621 on hovering. background color code compared predefined expected value. using xpath selector.
string xpathstr="//input[@id='add']"; string str = driver.findelement(by.xpath(xpathstr)).getcssvalue("background-color");
for above code can suggest me how check hovering of button css above mentioned code follows:
# add:hover , #clear:hover{ background-color:#f67621; }
i'm not sure, find :
how perform mouseover function in selenium webdriver using java?
actions action = new actions(driver); webelement = driver.findelement(by.id("add")); action.movetoelement(we).perform(); assertequals("#f67621", we.getcssvalue("background-color"));
other link :
http://www.learnseleniumtesting.com/mouse-hover-and-other-mouse-events-in-webdriver/
java selenium xpath selenium-webdriver
No comments:
Post a Comment