Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchElementException : Element cannot be found for calculator for C# #344

Open
SaveliyShur opened this issue Apr 18, 2021 · 0 comments
Open

Comments

@SaveliyShur
Copy link

Don't work:
var window = driver.FindElementByClassName("CalcFrame");
I see my calculator but i have OpenQA.Selenium.NoSuchElementException : Element cannot be found in this string.

        var dc = new DesiredCapabilities();
        dc.SetCapability("app", @"C:/windows/system32/calc.exe");
        var driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

        var window = driver.FindElementByClassName("CalcFrame");
        var resultField = window.FindElement(By.Id("150"));
        resultField.GetAttribute("Name");

        driver.Quit();

I change class name, and i start driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant