简体   繁体   中英

unable to identify object after closing the pop up in selenium java

I am using Selenium Webdriver (using Java language) to automate my application. My scenario is that, "Am supposed to click a button on a webpage, it will display the pop up, after I click some buttons in pop up, the pop up will get closed automatically and after that I need to enter some data into the webedit".

Now the issue am facing is that, am not able to enter the value into the webedit after closing the pop up. I am able to enter the value into the same webedit if I directly work with the webedit before I open the pop up.

You're probably using driver.switchTo().alert(); . You have to switch back to your original window after closing the alert.

It sounds like you need to wait for the page to load after closing your popup.

new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(By.id("U_1L_1001"))).click();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM