I have a container, which contains number of elements.I am looping thru the elements. My question is what is the syntax for checking if the element is NOT clickable.
相关问题
- Selenium in Java is not finding element when using
- How to send text to the search field through Selen
- What is the difference in “find_element_by_xpath”
- WebElement.getText() function and utf8
- Using python selenium for Microsoft edge
相关文章
- driver.Manage().Logs.GetLog(LogType.Browser) no lo
- Chrome: fake microphone input for test purpose
- Speeding up Selenium Webdriver
- Python Selenium Send Keys Giving Warning about siz
- How to Fix this C# issue No test matches the given
- Send keys not to element but in general selenium
- Selenium Javascript executor returns null
- scroll up the page to the top in selenium
You can try the following if else condition
Following should make it work -
This code is in Python. You can change it to the language of your choice.
You can create a custom keyword for it, but if element is displayed and enabled is required, but it's not all the conditions that make element clickable.
Example of custom keyword in custom lib:
One option is to do the following.
The existing methods, isDisplayed and isEnabled cannot check for whether the element is clickable or not.
If you want to wait for element till it is clickable and then click it, you may like to look this: Selenium WebDriver - determine if element is clickable (i.e. not obscured by dojo modal lightbox)
Actually, it may be difficult to check whether the element is clickable or not without actually clicking it.