Page 1 of 1

loading icon xpath

Posted: Thu Jun 23, 2022 8:25 am
by sachin_mise
Hi team

i have a control ,this is loading icon when i do some action then loading icon will show in the UI the next action will get show
now i need to wait till this disappear but i am not able to capture this object ,while capturing object will get disappear
but same object we wrote in the xpath for selenium ,we mover from selenium to ranorex ,

is any chance from seeing the selenium xpath and we can build the xpath for Ranorex ,
please help ,currently we have hard code the time but its not correct

selenium xpath : @FindBy(xpath = "//img[@alt = 'Loading...' or contains(@src,'busy') or @alt = 'Processing...' or text = 'Please wait ...']")
]

Re: loading icon xpath

Posted: Thu Jun 23, 2022 8:51 am
by odklizec
Hi,

Unfortunately, Ranorex implementation of xpath does not know expression "contains". In a theory, it should be enough to use xpath like this:

Code: Select all

//img[@alt = 'Loading...' or @src~'busy' or @alt = 'Processing...' or text = 'Please wait ...']
However, it would be helpful to add some more elements before 'img' element. The shorter the xpath is, the longer it may take to find the element during runtime. And if the element appears only briefly, Ranorex may not have enough time to actually find it.

Re: loading icon xpath

Posted: Thu Jun 30, 2022 12:33 pm
by sachin_mise
Thanks it worked :D