Check whether element is clickable in selenium

后端 未结 3 1440
孤独总比滥情好
孤独总比滥情好 2020-12-10 12:36

I\'m able to verify whether or not an element exists and whether or not it is displayed, but can\'t seem to find a way to see whether it is \'clickable\' (Not talking about

3条回答
  •  孤街浪徒
    2020-12-10 13:08

    to click an (for selenium) unreachable element i alwas use:

    public void clickElement(WebElement el) throws InterruptedException {
        ((JavascriptExecutor) driver).executeScript("arguments[0].click();", el);
    }
    

提交回复
热议问题