# How To Use Selenium And Appium Library Together

**URL:** <https://forum.robotframework.org/t/how-to-use-selenium-and-appium-library-together/8076>\
**Category:** Appium\
**Created:** [13 November 2024 15:55 UTC](https://forum.robotframework.org/t/how-to-use-selenium-and-appium-library-together/8076 "2024-11-13T15:55:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![varundunga](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/varundunga/32/4337_2.png) [@varundunga](https://forum.robotframework.org/u/varundunga)\
**Post date:** [13 November 2024 15:55 UTC](https://forum.robotframework.org/t/how-to-use-selenium-and-appium-library-together/8076/1 "2024-11-13T15:55:11Z")

</div>

I’m trying to write automation tests for an application which has both web application and mobile application(android and ios). For web, I’m using SeleniumLibrary and for mobile i’m using AppiumLibrary.

So I have started creating keywords however i’m seeing keyword conflicts between SeleniumLibrary and Appium Library as both has keywords with same name.  
Is there a way to import these libraries dynamically so that if i run tests related to web application, SeleniumLibrary should be used and AppiumLibrary when tests related to android or ios are run

 ![Screenshot 2024-11-13 at 15.54.41](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/8/851185186142c70457d998bb31e881029fa1d975.png)

---

<div class="post-metadata">

**Author:** ![EdManlove](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/edmanlove/32/1002_2.png) [@EdManlove](https://forum.robotframework.org/u/EdManlove)\
**Post date:** [13 November 2024 16:23 UTC](https://forum.robotframework.org/t/how-to-use-selenium-and-appium-library-together/8076/2 "2024-11-13T16:23:20Z")

</div>

As the error indicates, if you prepend the library name to the keyword it can then distinguish between which keyword from which library you are intending to use.

I see we could have a larger discussion about how one uses these two libraries together in ways that it doesn’t make it difficult or needed to specify every time which library you are meaning.

---

<div class="post-metadata">

**Author:** ![zastress](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/zastress/32/1259_2.png) [@zastress](https://forum.robotframework.org/u/zastress)\
**Post date:** [14 November 2024 10:08 UTC](https://forum.robotframework.org/t/how-to-use-selenium-and-appium-library-together/8076/3 "2024-11-14T10:08:00Z")

</div>

You could use [https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Set%20Library%20Search%20Order](https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Set%20Library%20Search%20Order) when using both libraries. This way you can target the first library directly and the second library with the name in front. Ex: SeleniumLibrary.Wait Until Page Contains

---

<div class="post-metadata">

**Author:** ![hassineabd](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/hassineabd/32/4266_2.png) [@hassineabd](https://forum.robotframework.org/u/hassineabd)\
**Post date:** [14 November 2024 10:14 UTC](https://forum.robotframework.org/t/how-to-use-selenium-and-appium-library-together/8076/4 "2024-11-14T10:14:05Z")

</div>

Since most of keywords of both libraries have same names you will need to specify the library each time you use a keyword that exist in both Selenium & Appium

Here is an example:

```
AppiumLibrary.Wait Until Page Contains 
SeleniumLibrary.Wait Until Page Contains 

```

( I recommend to do it for all keywords )
