Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mastafungus opened this issue Feb 1, 2024 · 4 comments

Comments

@mastafungus
Copy link

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 ?

@tkoukkari
Copy link
Contributor

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.

@mastafungus
Copy link
Author

Big Thanks !

It works with selenium 4.16.

@mopitithomne
Copy link

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.

@GitAmi55
Copy link

GitAmi55 commented Jun 5, 2024

@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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants