Hello, I’m starting to learn Selenium and UI.vision, so the question might look dumb.
I’m trying to figure out what the warning message I got means, and how to do what it suggests.
My first test macro is very simple:
- Go to a site, that has an iFrame with a checkbox inside
- Locate the checkbox and click on that selector
1st step of course went ok. Concerning the second one. I’m trying to click on [@id=“checkbox-label”] but I got the following message:
[warning] [Line 2]: Element found with secondary locator “xpath=//div[2]/div/div/div”. To use it by default, update the target field to use it as primary locator.
My JSON code of that step#2 looks like this:
{
“Command”: “click”,
“Target”: “[@id=“checkbox-label”]”,
“Value”: “”,
“Targets”: [
“id=checkbox-label”,
“xpath=//div[2]/div/div/div”,
“css=#checkbox-label”
],
“Description”: “”
}
What I tried to copy the “xpath=//div[2]/div/div/div” thing in the target box, to no avail. I did this but it still gave me same warning message. What I did looks like this:
{
“Command”: “click”,
“Target”: “xpath=//div[2]/div/div/div[@id=“checkbox-label”]”,
“Value”: “”,
“Targets”: [
“id=checkbox-label”,
“xpath=//div[2]/div/div/div”,
“css=#checkbox-label”
],
“Description”: “”
}
Any help or hint would be greatly welcome, thanks in advance