serhatbolsu/robotframework-appiumlibrary

Start Screen Recording : AttributeError: 'WebDriver' object has no attribute 'desired_capabilities'

mastafungus opened this issue · 4 comments

I'm using the following combination of packages:

robotframework 7.0
robotframework-appiumlibrary 2.0.0
selenium 4.17.2

I am using Appium 2.4.1 and uiautomator2@2.43.4

My tests run normally, 'open application' does its job, all the steps before reaching the keyword 'Start Screen Recording' work correctly (login, connection...) but when executing 'Start Screen Recording' I always get this error message:

AttributeError: 'WebDriver' object has no attribute 'desired_capabilities'

Here are my capabilities :
Open Application
... http://127.0.0.1:4723
... automationName=UiAutomator2
... platformName=Android
... autoGrantPermissions=true
... appWaitActivity='*.MainActivity'
... noReset=true
... fullReset=false
... newCommandTimeout=300
... app=C:/apk/V...

I tried to modify and complete the capabilities without success. I tried changing robotframework and uiautomator2 versions without success.

Does somebody have an idea ?

I noticed this too. It seems desired_capabilities has been removed in selenium 4.17.2 (it's still there in 4.16). I think it should be replaced by just capabilities. The fix is needed in _get_platform().

As a workaround you can downgrade to selenium 4.16.

Big Thanks !

It works with selenium 4.16.

I have the same issue while using Swipe By Percent keyword
I commented _get_platform() from the code and It works perfectly now.

It would be nice to get a fix for this.
It impacts other keywords.

@mopitithomne I have similar issue with swipe by percent. I am currently on selenium 4.16.0. I did try commenting out _get_platform() from the code but then swipe by percent, does not work as expected.

Does somebody have an idea ?