Why not try my solution:
You can download the jar from
and locate the jar in you projects Drivers
folder.
You can write you test case for example
import com.kazurayam.ks.testobject.TestObjectExtension
TestObjectExtension.apply()
WebUI.comment("#prettyPrint()\n" + tObj.prettyPrint())
You will see output like:
{
"cachedWebElement": null,
"objectId": "Object Repository/Page_CURA Healthcare Service/a_Make Appointment_BASIC",
"parentObjectShadowRoot": false,
"properties": [
{
"active": true,
"value": "a",
"condition": "EQUALS",
"name": "tag"
},
{
"active": true,
"value": "btn-make-appointment",
"condition": "EQUALS",
"name": "id"
},
{
"active": false,
"value": "./profile.php#login",
"condition": "EQUALS",
"name": "href"
},
{
"active": false,
"value": "btn btn-dark btn-lg",
"condition": "EQUALS",
"name": "class"
},
{
"active": false,
"value": "Make Appointment",
"condition": "EQUALS",
"name": "text"
},
{
"active": false,
"value": "id(\"btn-make-appointment\")",
"condition": "EQUALS",
"name": "xpath"
}
],
"imagePath": null,
"selectorMethod": "BASIC",
"selectorCollection": {
"BASIC": "//a[@id = 'btn-make-appointment']"
},
"useRelativeImagePath": false,
"parentObject": null,
"xpaths": [
],
"activeProperties": [
{
"active": true,
"value": "a",
"condition": "EQUALS",
"name": "tag"
},
{
"active": true,
"value": "btn-make-appointment",
"condition": "EQUALS",
"name": "id"
}
],
"activeXpaths": [
]
}