Check whether element is clickable in selenium

后端 未结 3 1420
孤独总比滥情好
孤独总比滥情好 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:13

    You can use webElement.isEnabled() and webElement.isDisplayed() methods before performing any operation on the input field...

    I hope this will solve you problem...

    Else, you can also put a loop to check above 2 conditions and if those are true you can specify the input text and again you can find the same element and you can get the text of the webelement and compare that text with the text you entered. If those matches you can come out of the loop.

提交回复
热议问题