How Selenium's ByChained class really works?

后端 未结 3 994
一生所求
一生所求 2020-12-30 08:10

I am very confused with what the documentation for ByChained class mentions. It says:

Mechanism used to locate elements within a docu

3条回答
  •  旧巷少年郎
    2020-12-30 08:39

    It's probably important to note (because I never see anyone mention this) that ByChained should be used just like any other By locator, like so:

    driver.findElements( new ByChained(By.id("details"), By.className("personName")) )
    

    or

    driver.findElements( new ByAll(By.id("err1"), By.className("errBox")) )
    

提交回复
热议问题