Bugzilla – Attachment 113688 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), 1.04 KB, created by
Martin Renvoize
on 2020-11-17 08:58:52 UTC
(
hide
)
Description:
Bug 26986: Prevent Selenium's StaleElementReferenceException
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2020-11-17 08:58:52 UTC
Size:
1.04 KB
patch
obsolete
>From 4a43a3fad9cd4adcd8983fe70e043ce5c2777fb9 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. > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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