Hello,
I am trying to move an Ionic 3 range slider.
It works when the slider is configured to display ‘ticks’ on the slider, in this case I can use xpath for #DOWN and #UP.
When the slider has no ‘ticks’ configured, I have no element to attach to.
I tried to XMove to ‘400,0’ hoping this would be relative to current Mouse position, but it is relative to viewport.
I tried XMoveRelative but only accept vision image, that i don’t want to use to be as generic as possible (slider can change color, position, aspect).
Is there any thing I can do to achieve my goal ?
Thank you.
Here is a demo script:
{
"Name": "fill_range-ionic",
"CreationDate": "2021-4-22",
"Commands": [
{
"Command": "open",
"Target": "https://ionicframework.com/docs/v3/demos/src/range/www/?production=true&ionicplatform=ios",
"Value": ""
},
{
"Command": "store",
"Target": "8",
"Value": "range"
},
{
"Command": "XMove",
"Target": "xpath=//ion-range[@color='danger']/div[@class='range-slider']//div[@aria-valuenow='1300']/div[@class='range-knob']",
"Value": "#DOWN"
},
{
"Command": "comment",
"Target": "When ticks are present:",
"Value": ""
},
{
"Command": "XMove",
"Target": "xpath=(//ion-range[@color='danger']/div[@class='range-slider']//div[contains(@class,'range-tick')])[${range}*1+1]",
"Value": "#UP"
},
{
"Command": "comment",
"Target": "when there are no ticks would like to move relative:",
"Value": "1000"
},
{
"Command": "XMove",
"Target": "xpath=//ion-range[@color='secondary']/div[@class='range-slider']//div[@class='range-knob']",
"Value": "#DOWN"
},
{
"Command": "XMove",
"Target": "400,0",
"Value": "#DOWN"
}
]
}