As part of a Robot Framework test I would like to access multiple objects from my page with the same keyword. The xpath of the objects looks like this:
//div[@class='col-sm-4 ng-scope']//h1[@class='ng-binding'][contains(text(),'Bot1')]
//div[@class='col-sm-4 ng-scope']//h1[@class='ng-binding'][contains(text(),'Bot2')]
//div[@class='col-sm-4 ng-scope']//h1[@class='ng-binding'][contains(text(),'Botx')]
I've tried to set a list variable with the name of my test objects (elements)
*** Variables ***
@{TESTBOTS} = Bot1 Bot2 Botx
*** Keywords ***
Delete Bots
go to ${LANDINGURL}
Sleep 3s
Click Element //div[@class='col-sm-4 ng-scope']//h1[@class='ng-binding'][contains(text(), @{TESTBOTS})]
However, I get the following error:
FAIL Element with locator '//div[@class='col-sm-2 ng-scope']//h1[@class='ng-binding'][contains(text(),'${TESTBOTS')]' not found.
I'd really appreciate if you could point me to the right direction. Thanks!
Delete Bots-- you just have an xpath where a keyword should be. - Bryan Oakley