loading icon xpath

Best practices, code snippets for common functionality, examples, and guidelines.
sachin_mise
Posts: 9
Joined: Thu Mar 24, 2022 11:46 am

loading icon xpath

Post by sachin_mise » Thu Jun 23, 2022 8:25 am

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 ...']")
]
You do not have the required permissions to view the files attached to this post.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: loading icon xpath

Post by odklizec » Thu Jun 23, 2022 8:51 am

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

sachin_mise
Posts: 9
Joined: Thu Mar 24, 2022 11:46 am

Re: loading icon xpath

Post by sachin_mise » Thu Jun 30, 2022 12:33 pm

Thanks it worked :D