I’m automating my software. It is a windows application.
I’m using and language for automation. I am capturing by using ui spy tool.

I’m getting an error following error

Exception in thread “main” org.openqa.selenium.NoSuchElementException:
An element could not be located on the page using the given search
parameters. Capabilities [{app=C:UsersAntonyDownloadssetup.exe, javascriptEnabled=true, platformName=XP, platform=XP}] Session ID:
9431CA0D-36D2-467E-A8C8-DBFC107865D8
*** Element info: {Using=accessibility id, value=txtUserName}

My Code:

public class Reporter 
{

    private static WindowsDriver<WindowsElement> driver;

    public static void main(String args[]) throws MalformedURLException, InterruptedException {

            DesiredCapabilities des=new DesiredCapabilities();

            des.setCapability("app", "C:\Users\Antony\Downloads\setup.exe");
            des.setCapability("deviceName", "WindowsPC");
            driver = new WindowsDriver(new URL("http://127.0.0.1:4723"), des);
            Thread.sleep(5000);




            driver.findElementByAccessibilityId("").sendKeys("");
}
}



Source link https://sqa.stackexchange.com/questions/34712/winapp-driver-not--web-elements

LEAVE A REPLY

Please enter your comment!
Please enter your name here