https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38236

--- Comment #10 from Victor Grousset/tuxayo <[email protected]> ---
(In reply to Jonathan Druart from comment #9)
> (In reply to Victor Grousset/tuxayo from comment #7)
> > Screenshot capture is broken in some failures. I had a patch to fix it that
> > I added to a selenium ticket 6mo/1y ago. But it was mixed with other changes
> > to testing process t/lib/Selenium.pm and ultimately wasn't retained. I'll
> > try to find it.
> 
> I don't understand. Could you add a capture_screenshot call before the
> failure and see how is the screen?
> 
>   $driver->capture_screenshot( 'test.png' );

Oh right! I though it was about the screenshot taken on failure.


So, after 6 failures in 188 runs

fail: https://lutim.lagout.org/8oEY7SVs/K9Vz9RK2.png

ok: https://lutim.lagout.org/gZ6IQwAu/f9MjqAoL.png

And turns out we are in a case where selenium_failure.png is managed to be
taken.
And it the same image as a success!

It seems that the list of AVs hasn't loaded yet when it fails. And when
selenium_failure.png is taken, the page has finished loading. Which is weird
because Selenium is supposed to wait for the load event to be
fired/document.readyState===complete.
And find_element() is supposed to wait until a timeout before failing. Given
that the runtime of the failed run is 10 sec more than a good run, it seem it
waited. But then somehow it didn't find the element, failed and the screenshot
just after shows a loaded page.
Random Selenium bug? >_<

Anyway, does the screenshots give any hint?


code change to take screenshot:
> @@ -176,6 +176,7 @@ SKIP: {
> [...]
> #$driver->find_element('//input[@id="'.$av_id.'"]/following-sibling::button[text()
>  = >"Delete"]')->click;
>+$driver->capture_screenshot( 'test.png' );
> $driver->find_element('//input[@name="id"][@value="'.$av_id.'"]/following-sibling::button')->click;
> $s->driver->accept_alert; # Accept the modal "Are you sure you want to delete 
> this authorized value?"

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to