ovh / venom

🐍 Manage and run your integration tests with efficiency - Venom run executors (script, HTTP Request, web, imap, etc... ) and assertions
Apache License 2.0
1.06k stars 144 forks source link

[bug] Web executor fill action behavior change between 1.1.0 and 1.2.0 #793

Open ArnaudLec opened 6 months ago

ArnaudLec commented 6 months ago

We are currently validating the impacts for migrating Venom to v1.2.0 and found a regression on the web executor when filling inputs which already contained values.

Before, with the v1.1.0, when filling a field which already contained a value, it was clearing the value before filling the input.

Now it concatenates the value and there's no option to clear the input beforehand.

Our use case is an option to duplicate a configuration in a screen and the form comes back already filled.

ArnaudLec commented 3 months ago

@yesnault Hi, I suppose, this has been closed by mistake because of #803. Can you reopen it since it's still a regression ?

yesnault commented 3 months ago

Hi @ArnaudLec, can you provide a full reproducer please? We'll reopen this issue.

ArnaudLec commented 3 months ago

I can't attach html or yaml files so since they are short, here they are.

Save this as input.html :

<!DOCTYPE html>
<html>
<body>
  <form>
    <input type="text" name="val" value="Initial_value" />
    <button type="submit">Submit</button>
  </form>
</body>
</html>

And here is the corresponding testsuite :

name: Input not emptied anymore on fill
vars:
  web:
    driver: chrome
    width: 1920
    height: 1080
    args:
    - 'browser-test'
    prefs:
      profile.default_content_settings.popups: 0
      profile.default_content_setting_values.notifications: 1
    timeout: 60
    debug: true
  url: 'file://{{.venom.testsuite.workdir}}/input.html'
testcases:
- name: reproducer
  steps:
  - type: web
    action:
      navigate:
        url: "{{.url}}"
  - type: web
    action:
      fill:
      - find: input[type="text"]
        text: "Some_other_value"
  - type: web
    action:
      click:
        find: button[type="submit"]
  - type: web
    action:
      click:
        find: input[type="text"]
    assertions:
    - result.url ShouldEqual "{{.url}}?val=Some_other_value"
yesnault commented 3 months ago

Thank you @ArnaudLec , we'll check that