Hi Team,
Dim Image1 As ImgTag
Image1 = "/dom[@domain~'1.2.3.*']/.//img[@id='imgLogo']"
Here the Default Timeout is 10 seconds only.
But there are times this image will be displayed after 10secs, in that case the test step is failing.
Can anyway we can increase this to 30 seconds?
I know how that can be accomplished in Repository, not sure how we can do this in desc prog style.
Regards,
Dal...
Increasing the Timeout of getting the Tag info thru RxPath
Re: Increasing the Timeout of getting the Tag info thru RxPath
You can put your search in a loop. While !True loop. So have your code wait for the object to appear. Also, put a timer in your loop that if it hasn't appeared after X seconds to fail out of the loop.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Increasing the Timeout of getting the Tag info thru RxPath
The approach recommended by Ranorex is to use the built in timeout functionality:
Regards,
Alex
Ranorex Team
Image1 = Host.Local.FindSingle("/dom[@domain~'1.2.3.*']/.//img[@id='imgLogo']", 30000)Just specify the time you want to search for the path for the "timeout" parameter (30 seconds in the example above). Using the timeout parameter does not change the default timeout value, it's only used for this call of the FindSingle method.
Regards,
Alex
Ranorex Team
Re: Increasing the Timeout of getting the Tag info thru RxPath
Add the following statment into your Main method will increase the Default timeout from 10s to 30s
This is the simplest way of doing this without modifying the existing code.
Regards,
Dal...
Code: Select all
Adapter.DefaultSearchTimeout = 30000
Regards,
Dal...