1
I need the bot to make a confirmation by clicking this button, which appears in a popup:
<button class="btn btn-info" id="c2e9772d-375d-47a1-9088-da9824d2e856">Sim</button>
But the button in question seems to be generated dynamically as it has a different ID for each transaction. This is the mapping I made:
driver.FindElement(By.Id("ce5597d1-6023-4e63-b3e9-ec2eb4475370")).Click();
Is there another way to make the bot find this button? By the text, for example? Or even by having the bot click on a specific window coordinate?
If it is always rendered in the same place, take it by xpath, go to the html code of the site, right click on the html button, then on copy -> xpath. Then call it the xpath -> driver.Findelement(By.Xpath("xpath here")). Click();
– Rafael Scheffer
It worked perfectly! Just one detail: I used copy -> copy full Xpath. With Xpath copy I could not solve
– Bruno Silva
I published as an answer there then. flwww
– Rafael Scheffer