Is It possible to combine libraries? Ex: Use Selenium and Appium libraries together on a mobile automation test

So, I want to use SeleniumLibrary’s keyword Set Selenium Speed . which Sets the delay that is waited after each Selenium command , but I guess it’s not possible, at best it would set a speed for Selenium commands, not the Appium ones, which are the ones I need to have a reduced speed.

Why is that? I am currently automating tests for registering in an Android app and I didn’t found something similar to Set Selenium Speed in AppiumLibrary, but if I don’t use a lot of Sleeps in between commands, Robot passes straight through some fields without sending text, and the test fails, I am basically searching for an alternative to Sleep.

Examplified bellow, in this code if I delete the Sleeps the test fails because doc field doesn’t get filled:

Click Element  xpath=//*[@index='2']  # Doc field
  #Wait Activity  MainActivity  timeout=2  interval=2
  Sleep  1
  Input Text  xpath=//*[@index='2']  '41838086854'  # Send valid doc number
  Sleep  1
  Click Element  xpath=//*[@index='3']  # Password field
  Sleep  1
  Input Password  xpath=//*[@index='3']  asdQWE123!@#  #Send valid password
  Sleep  1  # Dá para usar o comando 'Click Text' tbm (experimentar depois)
  Click Element  xpath=//android.widget.Button[@content-desc=\"LOGIN\"]  #Login button
  Sleep  2
  Wait Until Page Contains Element  xpath=//android.widget.Button[@content-desc=\"GENERATE SECURITY CODE\"] 

“Why is that?”

Well they are two completely separate libraries developed by different people for different use cases. It just so happens that selenium allows for a speed to be set while appium does not more than likely.

In terms of replacing sleep, have you tried using a wait like Wait Until Page Contains Element for the item to fully load before proceeding?

Otherwise you could look into using some of the wait combo keywords in Zoomba.MobileLibrary which is an extension of AppiumLibrary with some quality of life additions and tweaks.

“It just so happens that selenium allows for a speed to be set while appium does not more than likely.”

Unfortunately yes.

“In terms of replacing sleep, have you tried using a wait like Wait Until Page Contains Element for the item to fully load before proceeding?”

I tried some variants, but will explore a bit more these “wait until…”, like Wait Until Page Contains the text I am sending before going to the next command.

Also I’m reading this mobile library you cited right now, thank you very much for the reply!