Using RxPath and Object Repository
Posted: Wed Oct 03, 2012 5:58 pm
I'm new to RanoRex tool and I'm trying understand as how do I access the repository in my code block which is Object from Repository Vs RxPath.
I have used the below lines to access the repository as suggested by Ranorex by specifying the RxPath it works fine
Unknown webElem = null;
WebDocument webDoc = null;
WebElement webElem = webDoc.FindSingle("/dom[@domain='xx.xxx.xxx.xxx']//div[#'silverlightControlHost']/object/form/progressbar/container[@automationid='MenuScroller']", 60000);
However, do we have a way by which we can achive the same by accessing the object repository and achive the same. Something like
<RepositoryName> repo = <RepositoryName>.Instance;
repo.domObject.find();
where repo.domObject = "/dom[@domain='xx.xxx.xxx.xxx']//div[#'silverlightControlHost']/object/form/progressbar/container[@automationid='MenuScroller']"
This makes me confusing as should I purely go with the respository (but the later is not possible) and if I go by the Ranorex path I land-up changing objects every now and then as the AUT is still under initial development phase and objects might change.
Please let me know if I'm missing something.
Thank you so much in advance.
~Prash
I have used the below lines to access the repository as suggested by Ranorex by specifying the RxPath it works fine
Unknown webElem = null;
WebDocument webDoc = null;
WebElement webElem = webDoc.FindSingle("/dom[@domain='xx.xxx.xxx.xxx']//div[#'silverlightControlHost']/object/form/progressbar/container[@automationid='MenuScroller']", 60000);
However, do we have a way by which we can achive the same by accessing the object repository and achive the same. Something like
<RepositoryName> repo = <RepositoryName>.Instance;
repo.domObject.find();
where repo.domObject = "/dom[@domain='xx.xxx.xxx.xxx']//div[#'silverlightControlHost']/object/form/progressbar/container[@automationid='MenuScroller']"
This makes me confusing as should I purely go with the respository (but the later is not possible) and if I go by the Ranorex path I land-up changing objects every now and then as the AUT is still under initial development phase and objects might change.
Please let me know if I'm missing something.
Thank you so much in advance.
~Prash