Currently, I am using appium for iOS app testing and I have written tests in Java on mac mini machine. I’m using Jenkins CI to run my tests. I want to run my tests faster as currently its quite slow on iOS simulator. For example, if I enter any value in textfield via sendkeys() function like ’testdata’ then typing speed in emulator is slow. It first write character ’t’ then ‘e’ then ’s’ and so on from simulator’s keyboard.
Following are my questions,
You're actually not supposed to use sendKeys
on iOS because it's slow and flakey.
You're supposed to use setValue
for the Java lib and type
for the ruby lib
setValue
is defined in Java library here.
It is meant to be called on a WebElement.
driver.find_element(By.locator(value)).setValue("foo")
A live simulator or real device* is required for Instruments to interact with your application. There are some best practices you can follow to improve your test code which will likely make the tests quicker.
setValue
instead of sendKeysAutomating a real device has a builtin delay of one second between every action.
No matter how quick the Appium server is, or your test script is, there is a delay between when Appium pushes the "execute" command to the instruments work queue and when it is executed on the device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With