unable to find elements in web scraping

Carlos José González Arenas 1 Reputation point
2021-10-09T20:24:12.403+00:00

I can't find the a classname selenium in visual studio

could you please help me I need to scrape a page, but I can't find a class name, to continue with my project, I have tried several combinations without success

link page https://www.cuitonline.com/search.php?q=20062900890

I can enter from the main page, and obtain the desired result, but I need to enter the link of that result, it is the name that appears that is dynamic, but the class is always the same, I have placed a time dilator, but that dom se generate, but still not find the element

the visual studio me the following always says OpenQA.Selenium.NoSuchElementException: 'Unable to locate element: // div [@ class =' denomination ']'

even now that I have used Xpath.

This is the error message:

OpenQA.Selenium.NoSuchElementException: 'Unable to locate element: //div[@class ='denominacion']'

in visual studio
string cuit = "20062900890";
IWebDriver driver = new FirefoxDriver();
driver.Navigate().GoToUrl("https://www.cuitonline.com/");
var inputSearch = driver.FindElement(By.Name("q"));
inputSearch.SendKeys(cuit);
inputSearch.Submit();

        driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(10);  
        var nombreencontradoAhacerClick = driver.FindElement(By.XPath("//div[@class='denominacion']"));  
        var link = nombreencontradoAhacerClick.FindElement (By.XPath("./a"));  
        driver.Navigate().GoToUrl(link.GetAttribute("href"));  

i want to find the first and unique item of search, This item, in turn, has a link in itself, I want to capture it and enter it. and capture your item details

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,628 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
945 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,170 questions
0 comments No comments
{count} votes