mercredi 8 août 2018

Automating XCUIElementTypeWheelPicker Appium

I am having difficulty with automating the XCUITypeWheelPicker using Appium. I have a wheel picker with 4 options (and also a different date wheel picker on a different screen). 2-3 months ago, I was using:

browser.touchAction([ { action: 'tap', selector: 'XCUIElementTypePickerWheel' }, { action: 'moveTo', x: 0, y: -10 }, 'release' ]);

And this worked perfectly for my issue. For some reason, it no longer does on my MacBook (2015 model) but still works on a co-workers MacBook (2017 model). I have also tried using alternatives such as:

browser.execute('mobile: selectPickerWheelValue', {'order': 'next', 'offset': 0.15, 'element': $('XCUIElementTypePickerWheel')});

As well as selecting the next value in the wheel picker by clicking (X,Y) coordinates.

Could anyone provide a recommendation on how to automate a wheel picker?

Thanks!

Aucun commentaire:

Enregistrer un commentaire