select command incompatible between IDE and selenium-side-runner
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- testing
Research direction
The index locator is in packages/side-runtime/src/webdriver.ts around line 2096, where index builds a *:nth-child(${index}) CSS selector. Compare that with how Selenium IDE counts the index for the same select command, using the attached .side project as the reproduction. Done means that index=6 selects the same option in side-runner that IDE selects, with a test covering the select command.
Written by the indexing model from the issue text.
Description
🐛 Bug Report
If select command has a value of index, the result is incompatible with selenium-side-runner. In Selenium IDE, the index of 6 is the seventh child. However in selenium-side-runner, it is the sixth child.
{
"id": "c26f2fcb-37ee-463a-a891-16ec2c80d8d1",
"comment": "",
"command": "select",
"target": "id=month",
"targets": [],
"value": "index=6"
}
https://github.com/SeleniumHQ/selenium-ide/blob/trunk/packages/side-runtime/src/webdriver.ts#L2096
index: (index: string) => By.css(`*:nth-child(${index})`),
To Reproduce
Steps to reproduce the behavior:
I provided a script below
Expected behavior
A clear and concise description of what you expected to happen.
Selenium IDE and selenium-side-runner are compatible.
Project file reproducing this issue (highly encouraged)
Please provide a project file .side that reproduces this issue.
{
"id": "cd6cb310-1c43-41a8-98a8-d77f5673ff79",
"version": "2.0",
"name": "customer-mockup",
"url": "https://www.timeanddate.com",
"tests": [{
"id": "765c8d65-8988-4e06-874d-ef0c255bd682",
"name": "click-assert",
"commands": [{
"id": "d83c2f01-53e0-40eb-8e75-a4419f19f0d1",
"comment": "",
"command": "open",
"target": "/",
"targets": [],
"value": ""
}, {
"id": "8795b840-4de3-45e2-a091-72257f1d5bba",
"comment": "",
"command": "click",
"target": "xpath=//label[contains(., 'Month')]",
"targets": [],
"value": ""
}, {
"id": "c26f2fcb-37ee-463a-a891-16ec2c80d8d1",
"comment": "",
"command": "select",
"target": "id=month",
"targets": [],
"value": "index=6"
}, {
"id": "c531ef1d-d623-492d-8c1a-3ea0e8df8aa4",
"comment": "",
"command": "click",
"target": "xpath=//input[@value='View Calendar']",
"targets": [],
"value": ""
}, {
"id": "e14a5acc-c16a-4119-9976-fcf13296d60e",
"comment": "",
"command": "waitForElementPresent",
"target": "xpath=//h1[contains(., 'Calendar for June 2024 (United States)')]",
"targets": [],
"value": "10000"
}]
}],
"suites": [{
"id": "9e968b64-54fe-43a1-8356-546ba21b2b92",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["765c8d65-8988-4e06-874d-ef0c255bd682"]
}],
"urls": ["https://www.timeanddate.com/"],
"plugins": []
}
Issues without a reproduction project are likely to stall.
Environment
OS: Linux
Selenium IDE Version: 3.17.4
Selenium SIDE Runner Version: 4.0.12
Node version: v18.19.1
Browser:
Browser Version: Firefox 128.0.3
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 823
- Avg merge
- 3h 1m
- Merged PRs (30d)
- 117
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SeleniumHQ/selenium-ide
-
enhancement needs-triaging
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
SeleniumHQ/selenium-ide#2061 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SeleniumHQ/selenium-ide#1174 · 3 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 66/100
SeleniumHQ/selenium-ide#990 · 8 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SeleniumHQ/selenium-ide#759 ·
Maintainers usually reply within 1 day
-
Dependency DashboardOpen
Difficulty 5/5 Over a week Newbie friendliness 15/100
SeleniumHQ/selenium-ide#2022 ·
Maintainers usually reply within 1 day
All issues in SeleniumHQ/selenium-ide
Similar issues
-
Codex使用可 かんたん コード
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ryuki-moro/Nicomaru#348 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-integrations
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day