A newbie Ranorex, I come from a Selenium Python background.

I can not figure out how to find an array of similar elements in Ranorex. With Selenium, we can use something like:

array = webdriver.FindElementsByXpath(xpath)

How to do it using Ranorex?


Ranorex has its own set of methods, for examples:

If you are looking for an array of <div> elements, you need to:

WebDocument webDocument = "/dom[@caption = title of the webpage under test]";
IList <DivTag> array = webDocument.Find<DivTag>(xpath);

They are comparable to:

driver = Selenium.Chrome();
array = driver.FindElementsByXpath();

If you are looking for a group of element, replace <DivTag> with <ATag>.

  • 1
    Furthermore, you can organize xpaths to GUI elements in a repository, and reference those in your code. May 13 '17 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.