Dynamic Object Creation

TestObject dynamicObject = new TestObject().addProperty("xpath", ConditionType.EQUALS, xpath)
WebUI.setText(dynamicObject, inputValue)

I was able to set text in text fields using above lines of code but I am not able to click on Objects using:

TestObject dynamicObject = new TestObject('dynamicObject').addProperty('xpath', ConditionType.EQUALS, xpath)

WebUI.click(dynamicObject, xpath)

Can you please help me to get it resolved ? Is above approach/Syntax is correct ?

Comments

  • WebUI.click takes only TestObject (and/or FailureHandling as optional param). Thus try this:

    WebUI.click(dynamicObject)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion