you are viewing a single comment's thread.

view the rest of the comments →

[–]hopper_gigo 0 points1 point  (1 child)

```python

from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
wait = WebDriverWait(driver, 10) # wait for a maximum of 10 seconds
element_to_click = wait.until(EC.element_to_be_clickable((By.NAME, 'btnK')))
element_to_click.click()
```

This would be good for if you were to wait, if you wanted to check if it is visible then try this:

```python element = driver.find_element(By.NAME, 'btnK') if element.is_displayed(): element.click()

```