2gis / Winium.Desktop

Winium.Desktop is Selenium Remote WebDriver implementation for automated testing of Windows application based on WinFroms and WPF platforms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NoSuchElementException : Element cannot be found for calculator for C#

SaveliyShur opened this issue · comments

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.