0

enter image description here

These are the html for a button which changes x-path dynamically but "Show Actions" remains the same. I am confused whether "Show Actions" is name, title or id of the button.

Is there anyway to click this button with "Show Actions" or any other ways?

1 Answer 1

1

Show Actions seems to be the text content of the element.
You can try clicking it with the following way:

driver.find_element(By.XPATH, "//span[contains(text(),'Show Actions')]").click()

Or

driver.find_element(By.XPATH, "//span[contains(.,'Show Actions')]").click()

You will possibly need to add an expected condition to wait for this element clickability, as following:

wait.until(EC.element_to_be_clickable((By.XPATH, "//span[contains(.,'Show Actions')]"))).click()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.