robotframework-appiumlibrary icon indicating copy to clipboard operation
robotframework-appiumlibrary copied to clipboard

Need appium library to be updated to latest selenium 4.

Open rajeevpramanik opened this issue 3 years ago • 12 comments

Hello

As you know python is released to 3.10.4 version, and selenium to version 4. Could you please update the appium library which has selenium binding to older version.

Problem is, when I install appium, it replaces the new version of selenium to older. That's a big problem.

As I am using web+Mobile application automation together with robot framework 🤖.

Could you please give a solution to this. It would be very kind of you.

rajeevpramanik avatar Mar 26 '22 04:03 rajeevpramanik

Seems to be duplicate of #334

robco avatar Mar 28 '22 14:03 robco

This is fairly critical since RobotFramework-SeleniumLibrary cannot be installed together with AppiumLibrary anymore since SeleniumLibrary now strongly requires >=4.0.0 Selenium as dependency.

Please raise a priority to this issue.

ERROR: Cannot install robotframework-appiumlibrary==1.6.3 and robotframework-seleniumlibrary==6.0.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    robotframework-seleniumlibrary 6.0.0 depends on selenium>=4.0.0
    robotframework-appiumlibrary 1.6.3 depends on selenium<4 and >=2.47.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

robco avatar Mar 30 '22 09:03 robco

If you don't need to run the web tests and the mobile ones at the same time, you can create a bunch of virtual environments

Aledosim avatar Apr 07 '22 04:04 Aledosim

@Aledosim and that is exactly what typical modern test env setup looks like - you want to have web and mobile in your tests at the same time.

robco avatar Apr 07 '22 04:04 robco

@robco I would write a script to launch the tests asynchronously. I think bash is a better choice for this. Am I crazy?

Aledosim avatar Apr 07 '22 05:04 Aledosim

@Aledosim, with all the respect, not sure now if you are trying to troll this discussion here or something. But really, there is only one solution here - make AppiumLibrary to support selenium4. Without this there is no way to run your tests on web and mobile devices at once. Putting some weird setup script before execution which would switch selenium, seleniumlibrary, appiumlibrary and its dependencies, like Appium-Python-Client, to required versions, and not just once but as you execute (note that very often you have a test which does something in the mobile app and in next step does something in the browser) would make things horrible. Much easier is just onboard to selenium4 as it should be these days. Selenium3 is not supported anymore.

robco avatar Apr 07 '22 06:04 robco

It was a suggestion for a work around. Sorry to bother.

Aledosim avatar Apr 07 '22 15:04 Aledosim

I faced the same problem and it is already fixed in the code, but requires new release to be published fix: https://github.com/serhatbolsu/robotframework-appiumlibrary/commit/d0a518d0216a0e22561d5ba8fe68889863caae08

the workaround that I'm using is to first install robotframework-appiumlibrary and then sed this one line with new value:

# install rf appium lib first
pip install robotframework-appiumlibrary

# fix broken dependency
path=$(find . -type d -name "robotframework_appiumlibrary*")
broken='selenium (<4,>=2.47.1)'
fixed='selenium (>=2.47.1)'
sed -i "s/$broken/$fixed/g" $path/METADATA

# install rest of the libs
pip install -r requirements.txt

Hopefully this will help!

chrcht avatar Apr 14 '22 09:04 chrcht

After I installed Appium Library, I uninstall Selenium and installed it again. This way the installed version is <=4

Aledosim avatar Apr 17 '22 04:04 Aledosim

@Aledosim, yes, it will upgrade selenium to <=4 but it also breaks your AppiumLibrary installation..

robco avatar Apr 20 '22 06:04 robco

This is fairly critical since RobotFramework-SeleniumLibrary cannot be installed together with AppiumLibrary anymore since SeleniumLibrary now strongly requires >=4.0.0 Selenium as dependency.

Please raise a priority to this issue.

ERROR: Cannot install robotframework-appiumlibrary==1.6.3 and robotframework-seleniumlibrary==6.0.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    robotframework-seleniumlibrary 6.0.0 depends on selenium>=4.0.0
    robotframework-appiumlibrary 1.6.3 depends on selenium<4 and >=2.47.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

can you tell me how to do this i am new and cant figure any of this

saife-elRefaye avatar Aug 28 '22 02:08 saife-elRefaye

do you know when we will have a new release?

filipehb avatar Sep 01 '22 13:09 filipehb

please check with #363 , currently in beta

serhatbolsu avatar Oct 26 '22 13:10 serhatbolsu