I am trying to create a web application that automately republishes on a site for private sales.
Login and everything went well, but if I try to find and click the republish button it just wont work. I've tried it with every locator, but the problem is that every button got an uniqe ID. Example:
<button name="republish" type="button" data-testid="5484xxxxx-republish-button" class="Button__ButtonContainer-sc-3uxxxx-0 hxXxxX">Republish</button>
The last I've tried:
buttons = driver.find_elements(By.XPATH, "//*[contains(text(), 'Republish')]")
for btn in buttons:
btn.click()
But it also didnt work, same with By.NAME
, BY.TAG_NAME