How to validate the span tag length?

Best practices, code snippets for common functionality, examples, and guidelines.
mukh
Posts: 4
Joined: Tue Aug 23, 2022 9:38 am

How to validate the span tag length?

Post by mukh » Wed Aug 24, 2022 4:53 pm

How to validate the span tag length?
I have attached an image where i want to validate the length of number of locations span tag
Kindly let me know how can i do this in Ranorex?
You do not have the required permissions to view the files attached to this post.

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

Re: How to validate the span tag length?

Post by odklizec » Tue Aug 30, 2022 10:09 am

Hi,

At first, I'm not quite sure what do you mean by "span tag length"? Its size in pixels? You can get the width of an element via ScreenRectangle.Width method (or via GetValue action). See this post...
https://www.ranorex.info/width-of-label ... tml#p42462

At second, please post a Ranorex snapshot (NOT screenshot) of the problematic element. Screenshots are usually useless when evaluating UI. Thanks.
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