Hello,
The AUT doesn’t have much ID attribute defined in the HTML. So I have looked up the elements in which I need to perform some actions based on some kind of uniqueness which is present in the vicinity of them, such as a header in a section or a text in a paragraph etc.
Since the AUT provides dynamic contents, I have generated the absolute XPath programmatically by traversing up to the root <html>
tag. Some of the XPaths are like below:
/html[1]/body[1]/div[3]/div[1]/div[1]/div[2]/div[2]/div[2]/button[1]
/html[1]/body[1]/div[3]/div[1]/div[3]/div[1]/div[2]/div[1]/form[1]/span[1]/div[1]/div[1]/div[1]/input[1]
Afterward, I created the required TestObject
programmatically, set the xpath
TestObjectProperty
into it and used the builtin or custom Keyword
s to perform actions on it.
Following is the performance matrix I created based on execution reports:
OS | Browser | Execution Time |
---|---|---|
Linux | Chrome | 00:04:30.322 |
Linux | Firefox | 00:04:28.065 |
Windows | Chrome | 00:04:47.536 |
Windows | Edge | 00:04:38.561 |
Windows | Edge | 00:04:54.141 |
For IE, the lookup of the elements using this absolute XPath is taking a huge amount of time, even if I set 30 seconds timeout for the lookup, sometimes it is failing. Unlike other browsers, the test is passing in IE intermittently.
I even have tried to set nativeEvents
Desired Capabilities for IE to false
(ref), hoping it could improve the performance, but no luck.
Is there any other way to overcome the problem?
Thanks in advance.
Regards.