Christian L.
Christian L.

Reputation: 53

Selenium clear input field different behavior

Our customer uses the robot framework to test the application we are developing. I have the strange phenomena that they have a test that is working on their machines but not in our test execution environment and not on my local working station. I already narrowed it down to a single selenium keyword.

   SeleniumLibrary.Clear Element Text    ${elementXpath}

In general this is simply a python wrapper for

driver.find_element_by_id('foo').clear()

I already found out that the selenium function itself doesn't work as expected and found already this question. robot framework - Clear Element Text keyword is not working

The workarounds mentioned in this question works for me. But it is hard for me to sell the customer to change their keywords, if it is working for them.

I already checked the libraries and the browser version. All the same. I hoped someone has an explanation, why this keyword could work differently in some environment.

Chrome 84 Chromedriver 84

Upvotes: 0

Views: 295

Answers (2)

Christian L.
Christian L.

Reputation: 53

Found the answer. Customer did not use the most recent chromedriver, but a very old version 2.40.565498. For some reason this driver does not have the issue described in https://github.com/SeleniumHQ/selenium/issues/6741.

Upvotes: 1

A. Kootstra
A. Kootstra

Reputation: 6961

If you can not convince the client of the significant value of having a single test set that also validates in the early phases and environments of development, then this non-functioning statement should be the least of your worries. As the old adage goes: quality is not baked in afterwards, it's the result of validating every step of the way.

Without having detailed insight in the code base I'd recommend looking into Set Library Search Order Documentation and perhaps adding a Suite Setup Documentation where you set this will allow you to make the test set compatible with your environment, without modifying the actual customer test files.

Upvotes: 0

Related Questions