0

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

asked Jul 31, 2020 at 9:25
1
  • Going to suspect this is related to the handling of autocomplete fields only - which "can" be disabled in the test browser profile, but best handled for example by sending CTRL+'a' then sending BACKSPACE , literally. Commented Dec 8, 2020 at 17:16

2 Answers 2

1

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.

answered Jul 31, 2020 at 13:10
Sign up to request clarification or add additional context in comments.

Comments

0

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.

answered Jul 31, 2020 at 9:44

2 Comments

Okay. Maybe i forgot to mention, I would also like to understand it myself, why the keyword works on the one machine and not on the other. As far as I understand the issue with the keyword it should never have worked at all.
Can you add descriptions of the differences between the environments the client uses, your own local setup and the execution environment in your question through edit.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.