How to switch from a frame to a new window(not the parent window*)


I  had switched to a frame via driver.switchto().frame()……… in  that frame there is a hyperlink via which i need to switch to another(new) window. how to switch to new window,since if we directly apply getwindow handles() methos,it is not able to locate the element in the new window.

Train Asked on April 30, 2017 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)

    driver.switch().windows(“windowname”); – gets to window you wanted.



    Default Answered on May 5, 2017.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.