Page 1 of 1

Object synchronization

Posted: Wed Jun 30, 2010 6:42 am
by jainaakash
Hi Team,

Does Ranorex supports Object Synchronization? How do we implement this with Ranorex?

Thanks and Regards,
Aakash

Re: Object synchronization

Posted: Wed Jun 30, 2010 9:50 am
by Support Team
What do you mean by "Object Synchronization"?

If you mean thread synchronization, the .NET System.Threading namespace has all the functionality you need. Please, see the following web pages for more info:
http://msdn.microsoft.com/en-US/library/ms228964.aspx
http://msdn.microsoft.com/en-US/library ... ading.aspx
http://msdn.microsoft.com/en-US/library/3e8s7xdd.aspx

Regards,
Alex
Ranorex Team

Re: Object synchronization

Posted: Wed Jun 30, 2010 10:13 am
by jainaakash
Hi Alex,

Thanks for your response.
By Object syncronization, I mean that the tool waits till the object is fully loaded. For example, when you click on a link, you instert sync so that the tool waits till the entire page is loaded and then moves to the next step. Another example would be for a button to become enabled or disabled.
Explicit wait or Delay would be for a specified amount of time, but a sync waits only till the page or object is fully loaded.
Hope, I am not confusing.

Thanks and Regards,
Aakash

Re: Object synchronization

Posted: Wed Jun 30, 2010 2:09 pm
by dal
Hi,

Can you try the following code ....

Dim repo As TestRepository = TestRepository.Instance
Dim webDocument As WebDocument = repo.FormLogin.Self
webDocument.WaitForDocumentLoaded()

--Dal

Re: Object synchronization

Posted: Wed Jun 30, 2010 2:45 pm
by Support Team
Hi,

You can use the RxPath to check if the element has the expected state.
For example to check if a button is enabled or disabled you can use the following path
"enabled"
button[@controlname='button1' and @Enabled='True']
"disabled"
button[@controlname='button1' and @Enabled='False']
If the object could not be find with your RxPath, Ranorex throws an exception. If Ranorex throws an exception you know that the item is not available with your RxPath attributes. You can also change the timeout of the find method to increase the search time for an element, if you know that an item take longer time for your expected state.

Please also read following documentation
http://www.ranorex.com/support/user-gui ... apter.html
and take a look to our screencasts about RxPath
http://www.ranorex.com/support/screencasts.html

Regards,
Peter
Ranorex Support Team