Bugzilla – Attachment 113337 Details for
Bug 26986
Second try to prevent Selenium's StaleElementReferenceException
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26986: Prevent Selenium's StaleElementReferenceException
Bug-26986-Prevent-Seleniums-StaleElementReferenceE.patch (text/plain), 943 bytes, created by
Jonathan Druart
on 2020-11-10 10:38:58 UTC
(
hide
)
Description:
Bug 26986: Prevent Selenium's StaleElementReferenceException
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-10 10:38:58 UTC
Size:
943 bytes
patch
obsolete
>From 95e83fb0f7e4af8ff7f6edfff864d6e3096cc66e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 10 Nov 2020 11:37:55 +0100 >Subject: [PATCH] Bug 26986: Prevent Selenium's StaleElementReferenceException > >This is a follow-up bug for bug 26162 > >By finding the element before the click I hope to get the good element, >even if the page changed in the meanwhile. >--- > t/lib/Selenium.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/t/lib/Selenium.pm b/t/lib/Selenium.pm >index 758470b668..261502aae1 100644 >--- a/t/lib/Selenium.pm >+++ b/t/lib/Selenium.pm >@@ -218,7 +218,7 @@ sub click_when_visible { > my $clicked; > $self->remove_error_handler; > while ( not $clicked ) { >- eval { $elt->click }; >+ eval { $self->driver->find_element($xpath_selector)->click }; > $clicked = !$@; > $self->driver->pause(1000) unless $clicked; > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26986
:
113337
|
113360
|
113688