Got something new on Master_U18 #862 after bug 26143. 18:47:07 selenium_1 | 09:47:07.478 WARN - Exception: Element not found in the cache - perhaps the page has changed since it was looked up 18:47:07 selenium_1 | For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html 18:47:07 selenium_1 | Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' 18:47:07 selenium_1 | System info: host: '78b9a07f51f2', ip: '192.168.16.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-9-amd64', java.version: '1.8.0_91' 18:47:07 selenium_1 | Driver info: driver.version: unknown 18:47:07 koha_1 | 18:47:07 koha_1 | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} 18:47:07 koha_1 | /usr/local/share/perl/5.26.1/Selenium/Remote/Driver.pm:353 in Try::Tiny::try 18:47:07 koha_1 | (eval 1571):1 in Selenium::Remote::Driver::__ANON__ 18:47:07 koha_1 | (eval 1573):2 in Selenium::Remote::Driver::__ANON__ 18:47:07 koha_1 | (eval 1546):17 in Selenium::Remote::Driver::_execute_command 18:47:07 koha_1 | /usr/local/share/perl/5.26.1/Selenium/Remote/WebElement.pm:63 in Selenium::Remote::WebElement::_execute_command 18:47:07 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:184 in Selenium::Remote::WebElement::click 18:47:07 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:172 in t::lib::Selenium::click_when_visible 18:47:07 koha_1 | t/db_dependent/selenium/administration_tasks.t:131 in t::lib::Selenium::click It's failing consistently on D11 locally.
Created attachment 107888 [details] [review] Bug 26162: Make Selenium click action more robust See https://stackoverflow.com/questions/12967541/how-to-avoid-staleelementreferenceexception-in-selenium https://www.selenium.dev/exceptions/ https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors/StaleElementReference
Created attachment 107889 [details] [review] Bug 26162: Make Selenium click action more robust See https://stackoverflow.com/questions/12967541/how-to-avoid-staleelementreferenceexception-in-selenium https://www.selenium.dev/exceptions/ https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors/StaleElementReference This patch will fix the following failure we get under D11: 18:47:07 selenium_1 | 09:47:07.478 WARN - Exception: Element not found in the cache - perhaps the page has changed since it was looked up 18:47:07 selenium_1 | For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html 18:47:07 selenium_1 | Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' 18:47:07 selenium_1 | System info: host: '78b9a07f51f2', ip: '192.168.16.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-9-amd64', java.version: '1.8.0_91' 18:47:07 selenium_1 | Driver info: driver.version: unknown 18:47:07 koha_1 | 18:47:07 koha_1 | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} 18:47:07 koha_1 | /usr/local/share/perl/5.26.1/Selenium/Remote/Driver.pm:353 in Try::Tiny::try 18:47:07 koha_1 | (eval 1571):1 in Selenium::Remote::Driver::__ANON__ 18:47:07 koha_1 | (eval 1573):2 in Selenium::Remote::Driver::__ANON__ 18:47:07 koha_1 | (eval 1546):17 in Selenium::Remote::Driver::_execute_command 18:47:07 koha_1 | /usr/local/share/perl/5.26.1/Selenium/Remote/WebElement.pm:63 in Selenium::Remote::WebElement::_execute_command 18:47:07 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:184 in Selenium::Remote::WebElement::click 18:47:07 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:172 in t::lib::Selenium::click_when_visible 18:47:07 koha_1 | t/db_dependent/selenium/administration_tasks.t:131 in t::lib::Selenium::click
Created attachment 107940 [details] [review] Bug 26162: Make Selenium click action more robust See https://stackoverflow.com/questions/12967541/how-to-avoid-staleelementreferenceexception-in-selenium https://www.selenium.dev/exceptions/ https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors/StaleElementReference This patch will fix the following failure we get under D11: 18:47:07 selenium_1 | 09:47:07.478 WARN - Exception: Element not found in the cache - perhaps the page has changed since it was looked up 18:47:07 selenium_1 | For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html 18:47:07 selenium_1 | Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' 18:47:07 selenium_1 | System info: host: '78b9a07f51f2', ip: '192.168.16.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-9-amd64', java.version: '1.8.0_91' 18:47:07 selenium_1 | Driver info: driver.version: unknown 18:47:07 koha_1 | 18:47:07 koha_1 | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} 18:47:07 koha_1 | /usr/local/share/perl/5.26.1/Selenium/Remote/Driver.pm:353 in Try::Tiny::try 18:47:07 koha_1 | (eval 1571):1 in Selenium::Remote::Driver::__ANON__ 18:47:07 koha_1 | (eval 1573):2 in Selenium::Remote::Driver::__ANON__ 18:47:07 koha_1 | (eval 1546):17 in Selenium::Remote::Driver::_execute_command 18:47:07 koha_1 | /usr/local/share/perl/5.26.1/Selenium/Remote/WebElement.pm:63 in Selenium::Remote::WebElement::_execute_command 18:47:07 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:184 in Selenium::Remote::WebElement::click 18:47:07 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:172 in t::lib::Selenium::click_when_visible 18:47:07 koha_1 | t/db_dependent/selenium/administration_tasks.t:131 in t::lib::Selenium::click Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The code makes sense and reads well.. QA script passes. I tested this by running the relevant test in a loop over 50 iterations and didn't get the errors expecting in a D11 k-t-d. Signing off.
Pushed to master for 20.11, thanks to everybody involved!
Created attachment 107985 [details] [review] Bug 26162: Wait for the table to be refreshed The previous patch did not work as expected. We still got a StaleElementReference exception. But this time on 10:43:47 selenium_1 | Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector":"//*[@id=\"branchname\"]"} Because we found the one that existed on the page, not the one sent back in AJAX. The idea of this patch is to search for the "Showing 1 to X of Y entries" info and wait for X == Y
Last patch pushed to master for 20.11
backported to 20.05.x for 20.05.03
backported to 19.11.x for 19.11.09
Created attachment 108568 [details] [review] Bug 26162: Don't fall into an infinite loop If something went wrong we do want to stop the script!
Created attachment 108569 [details] [review] Bug 26162: [19.11] Fix DT info label There is an inconsistency in 19.11: % grep Showing koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc koha-tmpl/intranet-tmpl/prog/js/datatables.js koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc: var MSG_DT_INFO = _("Showing _START_ to _END_ of _TOTAL_"); koha-tmpl/intranet-tmpl/prog/js/datatables.js: "sInfo" : window.MSG_DT_INFO || "Showing _START_ to _END_ of _TOTAL_ entries", The "entries" is not always displayed. datatables.inc has been removed from 20.05 by Bug 24662: Remove global variables MSG_* from datatables.inc
We had administration_tasks.t in infinite loop on all 19.11 jobs. The first patch is for all branches and will prevent this problem to appear in the future. The second patch is for <=19.11 only
last two patches backported to 19.11.x for 19.11.09
Patch "Bug 26162: Don't fall into an infinite loop" Pushed to master for 20.11
So, this approach did not fix the problem. We got another failure: https://jenkins.koha-community.org/job/Koha_Master_U18/886/consoleFull Screenshot is: https://snipboard.io/nxYFhq.jpg 15:20:58 selenium_1 | 06:20:58.918 INFO - Executing: [click: 35 [[FirefoxDriver: firefox on LINUX (67a62258-11cc-423b-b6e7-0e9e8b66997a)] -> xpath: //div[@class="main container-fluid"]//a[contains(@href, "/admin/branches.pl?op=add_form&branchcode=UT_BC")]]]) 15:21:19 selenium_1 | 06:21:19.815 WARN - Exception thrown 15:21:19 selenium_1 | org.openqa.selenium.StaleElementReferenceException: Element not found in the cache - perhaps the page has changed since it was looked up 15:21:40 koha_1 | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} 15:21:40 koha_1 | /usr/local/share/perl/5.26.1/Selenium/Remote/Driver.pm:353 in Try::Tiny::try 15:21:40 koha_1 | (eval 1579):1 in Selenium::Remote::Driver::__ANON__ 15:21:40 koha_1 | (eval 1581):2 in Selenium::Remote::Driver::__ANON__ 15:21:40 koha_1 | /usr/local/share/perl/5.26.1/Selenium/Remote/Driver.pm:1330 in Selenium::Remote::Driver::_execute_command 15:21:40 koha_1 | /usr/local/share/perl/5.26.1/Selenium/Remote/Driver.pm:1330 in (eval) 15:21:40 koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:126 in Selenium::Remote::Driver::find_element 15:21:40 koha_1 | t/db_dependent/selenium/administration_tasks.t:137 in t::lib::Selenium::fill_form That's getting really (really!) annoying...
Master_D10 #342 (Docker_3)
Backported to 19.05.x branch for 19.05.15