Skip to content

[馃悰 Bug]: Selenium IDE error "n.createEvent(...).initKeyEvent is not a function" when use commands type or send keys聽#1949

Description

@kolgenpav

Description

While record test case in Firefox's (v. 150.0.1) Selenium IDE plugin (v. 3.17.4) and data entering in the input fields, the Selenium IDE writes type command. But when I run test script while type command executes I see an error in the log:
type on id=sum with value 10000 Failed: 10:38:07 n.createEvent(...).initKeyEvent is not a function
I try replace type command by send keys, but the error arises too:
sendKeys on id=term with value 6 Failed: 10:39:18 n.createEvent(...).initKeyEvent is not a function

Reproducible Code

{
  "id": "c6404a7e-687f-474d-9470-0aa461298871",
  "version": "2.0",
  "name": "TestProject",
  "url": "https://fin-calc.org.ua",
  "tests": [{
    "id": "4d4dea1a-7468-46f0-9a3d-4bc93c2c345a",
    "name": "SmokeTest",
    "commands": [{
      "id": "8a401c7c-97af-4008-b15b-6471a0ec078b",
      "comment": "",
      "command": "open",
      "target": "/ua/deposit/calculate/",
      "targets": [],
      "value": ""
    }, {
      "id": "d9b0108f-dd4c-40d7-a28e-5fe62330c3e2",
      "comment": "",
      "command": "setWindowSize",
      "target": "1335x796",
      "targets": [],
      "value": ""
    }, {
      "id": "b020b804-a49e-4617-99b6-eb31cdc2d1c1",
      "comment": "",
      "command": "//type",
      "target": "id=sum",
      "targets": [],
      "value": "10000"
    }, {
      "id": "4ece14b2-6b47-4be4-9d3f-d15a6bd9c504",
      "comment": "",
      "command": "sendKeys",
      "target": "id=term",
      "targets": [],
      "value": "6"
    }, {
      "id": "4409a231-8108-4763-81e4-56785b2c7509",
      "comment": "",
      "command": "type",
      "target": "id=percent",
      "targets": [
        ["id=percent", "id"],
        ["name=percent", "name"],
        ["css=#percent", "css:finder"],
        ["xpath=//input[@id='percent']", "xpath:attributes"],
        ["xpath=//section[@id='content']/form/fieldset/div/div[3]/input", "xpath:idRelative"],
        ["xpath=//div[3]/input", "xpath:position"]
      ],
      "value": "12"
    }, {
      "id": "2e9dd415-b3b4-4d94-a59a-76a6fb8352ce",
      "comment": "",
      "command": "click",
      "target": "id=i_scheme5",
      "targets": [
        ["id=i_scheme5", "id"],
        ["css=#i_scheme5", "css:finder"],
        ["xpath=//input[@id='i_scheme5']", "xpath:attributes"],
        ["xpath=//section[@id='content']/form/fieldset/div[6]/input", "xpath:idRelative"],
        ["xpath=//div[6]/input", "xpath:position"]
      ],
      "value": ""
    }, {
      "id": "b5aeeb07-49d7-4e04-b41b-b90872a2dedf",
      "comment": "",
      "command": "click",
      "target": "id=submit",
      "targets": [
        ["id=submit", "id"],
        ["css=#submit", "css:finder"],
        ["xpath=//input[@id='submit']", "xpath:attributes"],
        ["xpath=//section[@id='content']/form/fieldset/div[7]/input", "xpath:idRelative"],
        ["xpath=//div[7]/input", "xpath:position"]
      ],
      "value": ""
    }, {
      "id": "8a124243-6c08-429c-81d6-d24026b0452f",
      "comment": "",
      "command": "verifyText",
      "target": "css=.total > .right:nth-child(4)",
      "targets": [
        ["css=.total > .right:nth-child(4)", "css:finder"],
        ["xpath=//div[@id='chart']/table/tbody/tr[8]/td[4]", "xpath:idRelative"],
        ["xpath=//tr[8]/td[4]", "xpath:position"]
      ],
      "value": "10600.00"
    }, {
      "id": "7234e6dc-9501-47eb-a4a9-c8397b04fc79",
      "comment": "",
      "command": "runScript",
      "target": "window.scrollTo(0,1318.5)",
      "targets": [],
      "value": ""
    }]
  }],
  "suites": [{
    "id": "9b70f2df-14a3-4ad6-9a5f-546a300db5da",
    "name": "Default Suite",
    "persistSession": false,
    "parallel": false,
    "timeout": 300,
    "tests": ["4d4dea1a-7468-46f0-9a3d-4bc93c2c345a"]
  }],
  "urls": ["https://fin-calc.org.ua/"],
  "plugins": []
}

Debugging Logs

type on id=sum with value 10000 Failed: 10:38:07 n.createEvent(...).initKeyEvent is not a function

sendKeys on id=term with value 6 Failed: 10:39:18  n.createEvent(...).initKeyEvent is not a function

鈩癸笍 Last known working version: With Firefox v.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions