File tree Expand file tree Collapse file tree
selenium-elements/src/main/java/software/xdev/selenium/elements/remote Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 1.0.3
2+ * Removed reflection calls in `` CustomizableJsonToWebElementConverter `` as https://github.com/SeleniumHQ/selenium/issues/15884 was fixed #11
3+ * Selenium version 4.34+ is required
4+ * Updated dependencies
5+
16# 1.0.2
27* `` ImprovedRemoteWebElement ``
38 * Make it possible to disable auto scroll
Original file line number Diff line number Diff line change @@ -51,39 +51,20 @@ public static void install(
5151
5252 public static class CustomizableJsonToWebElementConverter extends JsonToWebElementConverter
5353 {
54- // Can be removed once https://github.com/SeleniumHQ/selenium/issues/15884 is fixed
55- private final Method mSetOwner ;
5654 private final Supplier <RemoteWebElement > remoteWebElementSupplier ;
5755
5856 public CustomizableJsonToWebElementConverter (
5957 final RemoteWebDriver driver ,
6058 final Supplier <RemoteWebElement > remoteWebElementSupplier )
6159 {
6260 super (driver );
63-
64- try
65- {
66- this .mSetOwner = JsonToWebElementConverter .class .getDeclaredMethod ("setOwner" , RemoteWebElement .class );
67- this .mSetOwner .setAccessible (true );
68- }
69- catch (final NoSuchMethodException ex )
70- {
71- throw new IllegalStateException ("Failed to find setOwner" , ex );
72- }
7361 this .remoteWebElementSupplier = remoteWebElementSupplier ;
7462 }
7563
7664 @ Override
7765 protected RemoteWebElement newRemoteWebElement ()
7866 {
79- try
80- {
81- return (RemoteWebElement )this .mSetOwner .invoke (this , this .remoteWebElementSupplier .get ());
82- }
83- catch (final IllegalAccessException | InvocationTargetException e )
84- {
85- throw new IllegalStateException ("Failed to call setOwner" , e );
86- }
67+ return this .setOwner (this .remoteWebElementSupplier .get ());
8768 }
8869 }
8970
You can’t perform that action at this time.
0 commit comments