Skip to content

I.clearField seems broken #332

Closed
Closed

Description

@mparpaillon

What are you trying to achieve?

Clear a form field (input text)

What do you get instead?

Form field is just not cleared (without any error)

Details

  • CodeceptJS version: 0.4.12
  • NodeJS Version: v6.9.2
  • Operating System: OS X (Sierra)
  • WebDriverIO
  • Configuration file:
{
  "tests": "./test_temp/*_test.js",
  "timeout": 10000,
  "output": "./test_temp/output",
  "helpers": {
    "WebDriverIO": {
      "url": "http://toto.browserstack.com",
      "restart": false,
      "browser": "chrome",
      "user" : "titi",
      "key" : "tata",
      "windowSize": "maximize",
      "desiredCapabilities": {
        "browserstack.local": true,
        "browserName": "chrome",
        "os": "OS X",
        "resolution": "1280x1024"
      },
      "coloredLogs": true,
      "waitforTimeout": 5000
    }
  },
  "include": {
    "I": "./test_temp/steps_file.js"
  },
  "bootstrap": false,
  "mocha": {},
  "name": "toto"
}

Activity

  1. DavertMik commented on Dec 24, 2016

    @DavertMik
    Contributor

    Sorry I couldn't reproduce this error locally. Probably I will need and HTML and JS for a page you are testing.
    Maybe there are some JS hooks or non-native input fields that prevents a field from being cleared.

  2. DavertMik commented on Dec 24, 2016

    @DavertMik
    Contributor

    On second check you may be right. Implementation of clearField is quite different from fillField and didn't throw an error when field was not located. I updated that and added clearField to other helpers. Now it should locate elements by name, labels, css, xpath, and throw an error if no element matched. Just as you expected it to be )

    Thanks for the report.

  3. mparpaillon commented on Dec 26, 2016

    @mparpaillon
    Author

    It seems to break on Chrome only (on 0.4.13).
    I'm testing via BrowserStack and no problem with IE11, Edge or Firefox... Just chrome.

    Probably a bug with WebdriverIO clearElement function ?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions