How to specify Dynamic elements

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
mikgra
Posts: 7
Joined: Wed Jul 29, 2015 1:50 pm

How to specify Dynamic elements

Post by mikgra » Thu Aug 20, 2015 12:15 pm

Hi,

I have a issue with automation. The thing is, i need to validate a textfield which transform a text after input to an HTML. The issue for me is, if i want to validate the text I get an error, which makes sense because im trying to validate a text against a HTML.

So my approach was checking the advanced settings in the Spy under browser&results.

I found out, that the text is also stored as a plain text. But i´m not able to refer to this plain text element.
It is kinda hard to explain.

Basically, in the advanced settings for the element text i have under Dynamic -> Documents -> PlainText.
In PlainText the information i need is stored, but i don´t know how to refer to this item.

Please find 3 screenshot attached, which follow the path to the PlainText.
1. Advanced_1
2. Advanced_2
3. Advanced_3

I hope someone can help me.

Thank you very much in advance.
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: How to specify Dynamic elements

Post by odklizec » Thu Aug 20, 2015 2:01 pm

Hi,

Unfortunately, it's very hard to help you without Ranorex snapshot of the element(s) in question. Screenshots with blurry texts are useless here. All I can suggest you is to check this blog post about automating dynamic elements...
http://www.ranorex.com/blog/automated-t ... ynamic-ids
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

mikgra
Posts: 7
Joined: Wed Jul 29, 2015 1:50 pm

Re: How to specify Dynamic elements

Post by mikgra » Fri Aug 21, 2015 6:12 am

Hi,

the problem is, this are partially sensible data. Therefore i´m not allowed to show specific data.

I will try to find a hint in the link you send me.

As described above, the problem basically is, the textfield itself stores the text as a HTML. But while checking the options I have, I saw, that there is a attribute which contains the PlainText. If i somehow can specify the element, that he should validate against an dynamic attribute with the context PlainText, it would fix the issue with the validation.

But thanks very much for the hint.

kind regards

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

Re: How to specify Dynamic elements

Post by odklizec » Fri Aug 21, 2015 7:06 am

Hi,

The problem is, I don't have a clue how your xpath looks, what's the error you are getting and what's the command/action you are trying to use in your test? ;) You see, it's very hard to help with only a fraction of required info. If you cannot provide your work data, you can always simulate the problem with a quick&dirty HTML sample and show it for example here...
http://www.w3schools.com/tags/tryit.asp ... table_test

Anyway, in the xpath, you can specify whatever adapter/element you see in the spy. So if you want to use plaintext instead of something else, you can of course use it in the pointed element's xpath. Most of the problems could be solved with carefully constructed xpath. But maybe I'm misunderstanding your problem? ;)
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

mikgra
Posts: 7
Joined: Wed Jul 29, 2015 1:50 pm

Re: How to specify Dynamic elements

Post by mikgra » Fri Aug 21, 2015 8:08 am

Hi,

Maybe I wasn't quite clear about what exactly my problem is. :)
The XPath stops at a specific element in the tree from which there is no way further down.
The element I am looking for is "hidden" in the Dynamic-Tree of this element in a subelement titled PlainText.
My problem is getting the value of this subelement. I cannot reach it via XPath and I need to use the "Edit Path Weights"-feature but I don't know how to access the PlainText-Attribute, it only shows me an option for dynamic, but none of its childAttributes.

dynamic
|
document
|
PlainText (which contains the value i want to validate or refer to)

thank you in advance.

Kind regards.
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: How to specify Dynamic elements

Post by odklizec » Fri Aug 21, 2015 8:30 am

OK, I think I now understand. You want to specify different weight so Ranorex (recording/spy) by default picks different element (plaintext).

The trouble with dynamic capabilities is, that they can only be accessed for certain types of technologies (WinForms, Flash/Flex, Web and Java) and you need to have the application running to be able to access them. And as far as I remember, there may be not all elements available in this dialog, which may be also your case ;)

I think this is something, you need to discuss with Ranorex folks, but I'm sure they will need to see the snasphot. If you don't want to publicly show the snapshot, you can always send it to [email protected]. I'm pretty sure your sensitive data will be completely safe with them ;)

BTW, there may be a way to manually add the missing dynamic capability. Please check this post...
http://www.ranorex.com/forum/missing-dy ... tml#p21384
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