1 year ago
#317714
xcolle
Swipe Automation - WebdriverIO - javascript Mobile
I'm new to javascript and I'm following this code but when starting automation it doesn't slide down page. (mobile)
`$(FORMS_ICON_HOME_SCREEN).click()
const {height} = driver.getWindowSize()
const anchorPercentage = 50
const startPointPercentage = 90
const endPointPercentage = 10
const anchor = height * anchorPercentage / 100
const startPoint = height * startPointPercentage / 100
const endPoint = height * endPointPercentage / 100
await $(FORM_HEADER_TEXT).click()
driver.touchPerform([
{
action: 'press',
options: {
x: anchor,
y: startPoint
}
},
{
action: 'wait',
options: {
ms: 1000
}
},
{
action: 'moveTo',
options: {
x: anchor,
y: endPoint
}
},
{
action: 'release',
options: {}
}
])
await $(ACTIVE_BUTTON).click()
});
});
` As I'm starting, putting as much detail as possible, please. Thank u
javascript
automated-tests
swipe
mobile-application
webdriver-io
0 Answers
Your Answer