0
Good afternoon, I’m having difficulty to solve this problem with Selenium, in which the code is running the automation perfectly and when it arrives at a certain element of the page that does not contain NAME or ID, because it is an inserted list I am using by Xpath.
driver.Manage().Timeouts().ImplicitWait(TimeSpan.FromSeconds(5));
IWebElement box = driver.FindElement(By.XPath("//*[@id=\"Account_body\"]/table/tbody/tr[2]/th/a"));
box.Click();
of the following error in VS:
OpenQA.Selenium.NoSuchElementException: 'no such element: Unable to locate element: {"method":"css selector","selector":"#Account_body > table > tbody > tr.dataRow.even.first > th > a"}
(Session info: chrome=74.0.3729.169)
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17763 x86_64)'
.i don’t know if I have to do an Attach like I’m used to Winatomation.
you’d like him to ignore if there’s no element, that’s it?
– Lucas Miranda
Not because the element does exist, and every time I search for Xpath is the same value
– igor fortaleza
two possibilities then, the element hasn’t loaded yet after the five-second Wait or your xpath is wrong
– Lucas Miranda
That’s where I get the shit.. that I already put a 20s Wait to test and already checked Xpath, already told me that I should reload the page as a attach to search for the reference. I don’t know if that’s necessary in Lenium
– igor fortaleza
pass the page there so I can take a look
– Lucas Miranda
i can give you the information along with elements code and pg with images.. as it is a Credicard system for OS cancellation
– igor fortaleza
Let’s go continue this discussion in chat.
– Lucas Miranda