Ask a Question

Reuse of objects and mapping

Occasional Contributor

Reuse of objects and mapping

On my site, I have a table object that is 'reused' on a second page, but the contents of the table are different.

EG: page1 -> Table.cell1.text = "Hello"

      page2 -> Table.cell1.text = "This is different"

In my mapping tree, I only have 1 entry for this. I am using the 'InnerText' and 'IdStr' to validate against.

In one test I test against the InnerText = "Hello", in another test I test against the InnerText = "This is different"

My second test fails because the mapped object has "Hello" as the text.

When I recorded the second test, it appears that the mapped object already existed, so it did not create a new one, nor did it 'update' the InnerText Value.

How would I get around this issue?


Try not use the dynamic properties for object mapping (unless and otherwise that is intentional). In this case you can just use the probably Row, Col, Class kind of properties and avoid the innerText. Once you have the object mapped with statc properties you can use the innerText for your check points.


Syed Ahmed Safvan

Showing results for 
Search instead for 
Did you mean: