SatelliteQE / airgun

AirGun is a Python library that is built over Widgetastic and navmazing to make Satellite 6 UI testing easier.
GNU General Public License v3.0
20 stars 66 forks source link

self.browser.clear(self.search_field) doesn't work on foreman search boxes #249

Closed rplevka closed 4 years ago

rplevka commented 5 years ago

The clear method has no effect on foreman search boxes. The method does not error out though, so the effect of repeated session.<entity>.search("foo") is that the search query is being chained. Workaround for now is to manually aim at the "x" icon next to the search bar that clears the output, Or, the nastier way- navigating away from the page and re-visit it.

abalakh commented 5 years ago

Couldn't reproduce for both katello and foreman entities. Tested on 6.5 SNAP4 and SNAP5. My env: Chrome Version 70.0.3538.102, ChromeDriver 70.0.3538.97. @rplevka @oshtaier What's your chrome(chromium) and, more importantly, chromedriver version?

oshtaier commented 5 years ago

@abalakh Just to be on the same page. Did you look exactly on a field with 'slash' on a beginning: image

abalakh commented 5 years ago

@oshtaier yep. My findings: Updating to Chrome Version 70.0.3538.110 (latest) didn't change a thing. BUT, after also updating chromedriver to latest - ChromeDriver 2.44.609545 (weird output in comparison with previous one btw) i was able to reproduce it. Seems like an issue in latest chromedriver itself (which doesn't surprise me, there was another regression in previous release).

oshtaier commented 5 years ago

I didn't touch my environment for a while, so not sure about the details, but I can reproduce issue constantly

abalakh commented 5 years ago

@oshtaier have you disabled chrome autoupdate? Chromedriver supports only few chrome versions, you should keep its version according to your Chrome version, otherwise issues like this may occur. Ok, so i'm playing with both ChromeDriver 70.0.3538.97 (d035916fe243477005bc95fe2a5778b8f20b6ae1) ChromeDriver 2.44.609545 (c2f88692e98ce7233d2df7c724465ecacfe74df5) and i can't reproduce it with 70.0.3538.97, but it's always reproducible on 2.44.609545, the issue is definitely there.

oshtaier commented 5 years ago

okay, I will check the version tomorrow

abalakh commented 5 years ago

Try this one tomorrow: https://chromedriver.storage.googleapis.com/index.html?path=70.0.3538.97/

oshtaier commented 5 years ago

I have: Version 64.0.3282.119 (Official Build) (64-bit) ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881)

Anyway, it doesn't matter as issue appeared on later not earlier versions, so we need to look into solution, not toss environment into different directions

vikask18 commented 5 years ago

It looks like this issue still persists.

My findings so far:

Also, I have tried updating the chrome driver to latest version - 75.0, but the issue remain persistent.

Anybody looking into this issue.

vijay8451 commented 5 years ago

@vikask18 under which test are you seeing this one ?

vikask18 commented 5 years ago

tests/foreman/ui/test_organization.py::test_positive_end_to_end

vijay8451 commented 5 years ago

as checked the tests issue more related to chrome browser/driver version latest version. as works fine with firefox.

vijay8451 commented 5 years ago

@oshtaier any thought if you get any chance to see it ?

oshtaier commented 5 years ago

hmm, it is huge chance that problem in chrome driver itself. If yes, so it is out of scope for my knowledge or my possibilities to fix

rplevka commented 5 years ago

I have 2 scenarios running the same driver and versions, where 1 failed and the other passed:

failing: https://app.saucelabs.com/tests/eca5f253c29c4c958fe5f98c79db76b7 this one does not receive the CLEAR request and goes straight to another request:

10:29:71 POST moveto
10:29:93 SEND KEYS

passing: https://app.saucelabs.com/tests/805f961847f349478c6fd261fea4ba0f

the difference is, that the failing test misses the whole bunch of steps (check the passing tests requests since 09:46:98 - the first one is probably a wait_for_ajax

vijay8451 commented 5 years ago

I tried below way(a bit workaround to avoid wrong search):

session.browser.refresh()
mirekdlugosz commented 4 years ago

Closing, as #344 and #383 got merged, and tests/foreman/ui/test_organization.py::test_positive_end_to_end passes just fine. I'm not sure there is any more work for us to do here.

If anyone disagrees, feel free to re-open and explain what still needs to be done.