Ways to deal with #document under iframe

前端 未结 2 1682
不知归路
不知归路 2020-11-21 04:44

For the portal I am testing now, I came with the problem that I could not create any xpath locators, after some time I figured out that it was because of an \'#document\', t

2条回答
  •  盖世英雄少女心
    2020-11-21 05:16

    To work with elements inside iframe you must switch to this specific iframe.

    Your solution .switchTo().frame("FRAMENAME"); is correct. Selenium does not have any other ways to work with iframe wrappers.

提交回复
热议问题