Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select command incompatible between IDE and selenium-side-runner #1853

Open
lijingmu opened this issue Aug 7, 2024 · 0 comments
Open

select command incompatible between IDE and selenium-side-runner #1853

lijingmu opened this issue Aug 7, 2024 · 0 comments

Comments

@lijingmu
Copy link

lijingmu commented Aug 7, 2024

🐛 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant