selenium - webdriver C# - dropdown selectByVisibleText -
trying select word inside dropdown menu.
in webdriver ide appear click dropdown (which id "p" , click word "barcelona" inside dropdown.:
i can open dropdown menu using:
driver.findelement(by.id("p")).click();
now i'm trying select word inside dropdown menu, using "selectelement" , "select visibletext" not work in c# webdriver me.
selectelement selector = new selectelement.selectbyvisibletext("barcelona");
any helps please?
using c# webdriver , not java.
i think problem in selectelement initialization. can try following code:
selectelement selectelement = new selectelement(driver.findelement(by.id("p"))); selectelement.selectbytext("germany");
if new in c# webdriver api, can find following article useful: http://automatetheplanet.com/getting-started-webdriver-c-10-minutes/
Comments
Post a Comment