Selenium in C# - How do I navigate different frames

前端 未结 2 606
伪装坚强ぢ
伪装坚强ぢ 2020-12-22 11:35

The website has the following elements:

\"html\"

It has 3 different frames, how do I navigate myself to the

2条回答
  •  萌比男神i
    2020-12-22 12:33

    I have done this in the past using:

    m_internetExplorerDriver.SwitchTo().DefaultContent();
    //put your name or id instead, e.g. "navigation" instead of "menuframe"
    m_internetExplorerDriver.SwitchTo().Frame("menuframe"); 
    

    Basically you use the Frame() method to switch between frames..

    In this question you can read how to identify the frame:

    How to identify and switch to the frame in selenium webdriver when frame does not have id

提交回复
热议问题