c# - How to stop loading browser page in selenium webdriver -
i using seleninum web driver in c# , facing weird problem. while automating encountered problem page continuously loading although dom content has been loaded. have way go forward until not stop, why driver throws timeout exception. so, need know there way stop page load webdriver.
i have googled no luck.
you can 2 things. use actions class press esc key stop page loading, code shown bellow:
actions actions = new actions(driver); actions.sendkeys(keys.escape);
or user javascriptexecutor samething:
((ijavascriptexecutor)driver).executescript("return window.stop();");
Comments
Post a Comment