Skip to content

WinAppdriver tests failures from locked Windows 10 machine  #477

@sabarishnarain

Description

@sabarishnarain

I'm running UI tests on a UWP app where the tests fail with the following exception when the win 10 machine is locked. But tests are running successful otherwise.

I need help understanding what the exception mean

org.openqa.selenium.WebDriverException: Unable to find the given UIObject.
Search criteria:'ClassName = Windows.UI.Core.CoreWindow'
Search domain:'A collection of MS.Internal.Mita.Foundation.UIObject instances in the set defined as Children of '{My Application, ApplicationFrameWindow, 42.1443280}' ('[Unknown UICondition]') matching: Condition: 'True'..' (WARNING: The server did not provide any stacktrace information)

Source code :

String windowHandle = desktopSession.findElementByName("MyApplication").getAttribute("NativeWindowHandle");

Util.waitFor(5000);
DesiredCapabilities viewCaps = new DesiredCapabilities();
viewCaps.setCapability("appTopLevelWindow", toHex(windowHandle));

try {
/** exception thrown here **/
viewSession = new WindowsDriver(new URL("myappiumurl"), viewCaps);
} catch (MalformedURLException e) {
log.error("Exception occured on attaching View session", e);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions