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
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.
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