简体   繁体   中英

Selenium C# - How to identify the window after close de modal?

After close the modal window, how to go back to the previus page? I need to run a comand, but isn't identify my currente page.

You can use the following solution to go back to the previous page after closing the modal window (works with Coordinates, for example):

IJavaScriptExecutor js = driver as IJavaScriptExecutor;
System.Threading.Thread.Sleep(5000);
js.ExecuteScript("window.scrollBy(0,950)");

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