Getting a single TestObject from a TestObject that returns multiple elements

Hello,

I have a dynamic web application that renders multiple on page tabs. These all have an input field that I need to fill with different values.

My XPath expression runs correctly and says it found all eight elements. From the script, I can use findTestObject to get this object.

However, I can’t use the setText because I need to set every element independently.

Using WebUiCommonHelper.findWebElements gives me the different elements, and i can print their current value. However, this is a read-only text property.

Is there a way for me to use the findTestObject return value and split it up based on the found elements?

Creating dynamic test objects with an addproperty xpath that uses the nth value to return only a single testobject works. However, this will increase the complexity of the tests we will have to make. I prefer using the testobject I have in the object repository.

I am not a native English speaker so if the question is unclear, please say so, and I can attempt improving the question.

Thanks in advance,

Jasper

iril,

You wrote:

Using WebUiCommonHelper.findWebElements gives me the different elements, and i can print their current value.

I suppose that WebUI.findWebElements is the right tool for you. But I do not see what you want to do. Could you share your target HTML code and screenshot, your current test case code, your Test Object (xpath). And please state what you want to do more specifically in a way like "I want to change the text “x” of the Y element to “z”.