I’m new to automated testing. I’m utilizing C#, Selenium and Chrome 99 with the right driver. I’m making an attempt to get to an anchor tag on the web page.
Right here is my code that’s not working,
driver.Url = "abc.com"; //cant show the true one
driver.FindElement(By.XPath("//a[@href="https://sqa.stackexchange.com/questions/49922/ubEntryQueue.aspx"]")).Click on();
The error I get:
OpenQA.Selenium.NoSuchElementException
HResult=0x80131500
Message=no such aspect: Unable to find aspect: {"methodology":"xpath","selector":"/a[@href="https://sqa.stackexchange.com/questions/49922/ubEntryQueue.aspx"]"}
(Session information: chrome=99.0.4844.74)
Supply=WebDriver
StackTrace:
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.FindElement(String mechanism, String worth)
at OpenQA.Selenium.By.<.ctor>b__11_0(ISearchContext context)
at OpenQA.Selenium.By.FindElement(ISearchContext context)
at OpenQA.Selenium.WebDriver.FindElement(By by)
at CLQTesting.WQ.ValidateWQDisplays() in C:QACLQTestingWQ.cs:line 30
This was my final try