Is it possible to make an if-clause, wether a repository was found or not?
Because I have a repository item in my repository, that can not be found by ranorex, although it has the full path to the item.
Interrogation if Repository was found
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: Interrogation if Repository was found
If you mean an element from a repository:
if (repository.SomeFolder.elementInfo.exists()) { Report.Debug("Found element"); }Whare repository is your repository object, folder and element are in a repository. Each element should have an Info object automaticaly created.
Re: Interrogation if Repository was found
The problem is that I have a repository item that can not be clicked by ranorex and i dont know why.
I tried recording the button, then taking the absolute path, I tried tracking the button with the spy with the absolute path, I tried shortening the path but nothing works. I will send you a Ranorex snapshot, maybee you can help me.
I tried recording the button, then taking the absolute path, I tried tracking the button with the spy with the absolute path, I tried shortening the path but nothing works. I will send you a Ranorex snapshot, maybee you can help me.
You do not have the required permissions to view the files attached to this post.
Re: Interrogation if Repository was found
Okay this is odd.
I have made a recording which presses the save button. When I play the recording it finds the button but when I play the complete test, the recording doesn`t find the button...
I have made a recording which presses the save button. When I play the recording it finds the button but when I play the complete test, the recording doesn`t find the button...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Interrogation if Repository was found
What's the RanoreXPath of the item you are searching for?
Could you post the complete error message you get when the item is not found?
Do you get any warnings in the report?
From your snapshot it looks like the "ID" attributes of your web elements are dynamic, i.e. they might not be the same every time you start the browser/scenario. Try not to use dynamic attributes or try to use regular expressions to only check for static parts of the ID.
See following sections in the Ranorex User Guide and the RanoreXPath screencasts for more information:
http://www.ranorex.com/support/user-gui ... xpath.html
http://www.ranorex.com/support/user-gui ... ditor.html
http://www.ranorex.com/support/screencasts.html
Regards,
Alex
Ranorex Team
Could you post the complete error message you get when the item is not found?
Do you get any warnings in the report?
From your snapshot it looks like the "ID" attributes of your web elements are dynamic, i.e. they might not be the same every time you start the browser/scenario. Try not to use dynamic attributes or try to use regular expressions to only check for static parts of the ID.
See following sections in the Ranorex User Guide and the RanoreXPath screencasts for more information:
http://www.ranorex.com/support/user-gui ... xpath.html
http://www.ranorex.com/support/user-gui ... ditor.html
http://www.ranorex.com/support/screencasts.html
Regards,
Alex
Ranorex Team
Re: Interrogation if Repository was found
The ID of the used Webelements is not dynamic, I have tested that one first. I have edited the path about 100 times until i found a path that would work. The path is :
I still don't know why the others did not work but problem solved 
with kind regards
Code: Select all
".//li[@id='Ribbon.ListForm.Edit.Commit']/span[1]/span[1]/span/span/span/a[@id='Ribbon.ListForm.Edit.Commit.Publish-Large']/span[@innertext='Speichern']"

with kind regards