licanhua / YWinAppDriver

A open source project provides WinAppDriver compatible functionality
MIT License
49 stars 10 forks source link

Unable to create session with attachToTopLevelWindowClassName #21

Closed shoaibmansoor closed 2 years ago

shoaibmansoor commented 3 years ago

app property should not be required when the user provides a native window handle for creating a session.

I am getting the following error message: {"error":"SessionNotCreateException","message":"JsonSerializationException: Cannot write a null value for property 'app'. Property requires a non-null value. Path 'desiredCapabilities'."

image

licanhua commented 3 years ago

Are you trying to use appium, but you didn't use actually Appium.

You need to have capability like this: { "app": "Root", "attachToTopLevelWindowClassName": "???" } YWinAppDriver doesn't understand "appium:attachToTopLevelWindowClassName", and expect appium to remove the appium: prefix