Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How to change iOS slider value through Appium/WebdriverIO

$
0
0

I am testing my React Native app using Appium and WebdriverIO. Having difficulty in changing slider values.

Normally in XCUITest I can easily achieve this using the following code:

app.sliders["slider-red"].adjust(toNormalizedSliderPosition: 0)

How to do the equivalent in Appium/WebdriverIO? I read somewhere that I should call sendKeys(). I tried the following:

$('~slider-red').sendKeys(['0']);

But it is giving me the following error:

invalid element state: Error Domain=com.facebook.WebDriverAgent Code=1 "The on-screen keyboard must be present to send keys"

It looks like sendKeys is for input fields, not for sliders!


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>