how to refresh an element's attribute in real time?

Ask general questions here.
hobli
Posts: 59
Joined: Thu Jul 30, 2009 1:15 am

how to refresh an element's attribute in real time?

Post by hobli » Thu Sep 16, 2010 3:22 pm

Hi, Ranorex staff,

I have come across the situation where an element's attribute (e.g, visibility) may change in run time, and I need to detect this change. however, it seems Ranorex does not update the attribute of an element in run time (or it does not reflect the change of element's attributes immediately??)

what I am doing now is as following:

Code: Select all

dim anElement as element = "<element rxpath>"
dim visibility as boolean

visibility = anElement.visible
while anElement.visible = visibility
delay.ms(100)
anElement = "<element rxpath>"
wend
without the last statement, the visiblity of the element may not reflect in time.
I would like to know if there are any method to force element refresh its attribute on request?

thanks a lot

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: how to refresh an element's attribute in real time?

Post by Support Team » Fri Sep 17, 2010 12:28 pm

Hi,

I've tried out your code and there were no update delays in running this testcase even by commenting the last statement of your code. The result was as expected.

Which technology is used for your tested application?

Regards,
Tobias
Ranorex Support Team

hobli
Posts: 59
Joined: Thu Jul 30, 2009 1:15 am

Re: how to refresh an element's attribute in real time?

Post by hobli » Sat Sep 18, 2010 5:17 am

hi,

we are using asp.net, and javescript. This issue is not always seen, but quite often, especially when after perform some "action" on some web element, and web element is supposed to change it's attribute.

I have seen some posts mentioned about "cache feature" of ranorex, is that related to this issue?

thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: how to refresh an element's attribute in real time?

Post by Support Team » Mon Sep 20, 2010 12:24 pm

Hi,

you can try to disable caching for the corresponding web site in repository.
  • select the web site in repository
  • set the "Use Cache" configuration for the website to "False".
If the problem is solved by disabling the cache, try to use absolute paths to prevent this problem. Therefore please adapt your RxPath in repository and check for each element if the RxPath is unique.

Regards,
Tobias
Ranorex Team

hobli
Posts: 59
Joined: Thu Jul 30, 2009 1:15 am

Re: how to refresh an element's attribute in real time?

Post by hobli » Mon Sep 20, 2010 1:55 pm

Hi,

thanks for your information. however, we are not using the repository provided by Renorex, we have own file to store key webelements' path information, but the path we used are not all "absolute", could this be the problem?

anyway, I will update you when I get more information.

thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: how to refresh an element's attribute in real time?

Post by Support Team » Wed Sep 22, 2010 8:12 am

Hi,

the fact that not all of your paths are absolute can of course be the problem, because it is possible that those paths to your elements are not unique. So try to use absolute paths to ensure that the problem will not occur any longer.

Regards,
Tobias
Ranorex Team