Java client 8.3.0 commands replacement

Hi,
I’m trying to increase java-client version in our UI Automation repo to the latest 8.3.0 version of java client. I can see that some of the commands are now obsolete or unavailable:

Android:

  • driver.activateApp(packageName)
  • driver.closeapp()
  • driver.runAppInBackground(milliSeconds) //This command put the app to background for the time provided, then woke it back up

iOS:

  • driver.getKeyboard().sendKeys(text)

Common:

  • driver.hideKeyboard()

I would appreciate your feedback on how you replaced these commands (with an example, if possible) :slightly_smiling_face:

driver.activateApp(packageName)
driver.hideKeyboard()
driver.runAppInBackground(milliSeconds)

I do not see any of these methods being deprecated or unavailable. Could you provide more details?

2 Likes

@mykola-mokhnach, I checked again and I noticed that I need to cast my driver to IOSDriver or AndroidDriver, then I get it available. :smile: Thanks!

@MrZigaS @mykola-mokhnach

What about driver.getKeyboard().sendKeys(text)?
Any suggestions on how to replace this since getKeyboard() method is no longer available?

new Actions(driver).sendKeys(text).perform();

just same as in -> https://www.selenium.dev/documentation/webdriver/actions_api/keyboard/

2 Likes

Thanks a lot, it worked.