Unable to find ::before css selector element in selenium webdriver

前端 未结 3 1373
野趣味
野趣味 2021-02-15 18:51

I want to test for checkbox checked or unchecked condition.

This is the html code for checkbox checked

<
3条回答
  •  盖世英雄少女心
    2021-02-15 19:23

    I have faced similar issue with pseudo css selectors (::before alike), I have overcome the issue using "Actions" class of selenium java.

    Actions action = new Actions(driver);
    action.moveToElement(driver.findElement(By.cssSelector("button[id$='save-button']"))).build().perform();
    

    Hope it helps.

    Thanks, Sampath

提交回复
热议问题