Selenide test fails to interact with Material`s checkbox

后端 未结 1 1772
[愿得一人]
[愿得一人] 2021-01-28 00:50

Dear stackoverflowers.

We are using Selenide framework in our project to write automation tests for UI. We switched to Material-UI recently and faced with technical prob

1条回答
  •  梦毁少年i
    2021-01-28 01:39

    It's not a Selenide problem, but a common Selenium problem. Selenium defines elements with "opacity: 0" as invisible. See How to force Selenium WebDriver to click on element which is not currently visible?

    One simple way to enable this checkbox is to click its parent element:

    $("input[type=\"checkbox\"]").parent().click();
    

    At least it works for me.

    0 讨论(0)
提交回复
热议问题