Selenium Webdriver -- No such Element -
i trying login sears.com using selenium
webdriver.clicked
on sign in link-->login form opens.
but unable locate text box element inside login form. login form inside iframe (frame name =easyxdm_default5914_provider
).this iframe inside div (id=modaliframe)
driver.switchto().frame(driver.findelement(by.xpath(".//iframe[@id='easyxdm_default5914_provider']"))); driver.switchto().activeelement(); driver.findelement(by.id("email")).sendkeys("xxx@gmail.com");
getting below exception in console:
org.openqa.selenium.nosuchelementexception: unable locate element: {"method":"id","selector":"email"}
try below code.
driver.get("http://www.sears.com/"); driver.findelement(by.xpath("//*[@id='header-shop-your-way-partner']")).click(); driver.findelement(by.xpath("//*[@id='open-sign-in-form']/span[2]")).click(); driver.switchto().frame("registration-form-iframe"); driver.findelement(by.xpath("//*[@id='email']")).sendkeys("abcd@gmail.com"); thread.sleep(3000);
Comments
Post a Comment