File tree Expand file tree Collapse file tree 2 files changed +6
-20
lines changed
selenium-elements/src/main/java/software/xdev/selenium/elements/remote Expand file tree Collapse file tree 2 files changed +6
-20
lines changed 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
+
1
6
# 1.0.2
2
7
* `` ImprovedRemoteWebElement ``
3
8
* 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(
51
51
52
52
public static class CustomizableJsonToWebElementConverter extends JsonToWebElementConverter
53
53
{
54
- // Can be removed once https://github.com/SeleniumHQ/selenium/issues/15884 is fixed
55
- private final Method mSetOwner ;
56
54
private final Supplier <RemoteWebElement > remoteWebElementSupplier ;
57
55
58
56
public CustomizableJsonToWebElementConverter (
59
57
final RemoteWebDriver driver ,
60
58
final Supplier <RemoteWebElement > remoteWebElementSupplier )
61
59
{
62
60
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
- }
73
61
this .remoteWebElementSupplier = remoteWebElementSupplier ;
74
62
}
75
63
76
64
@ Override
77
65
protected RemoteWebElement newRemoteWebElement ()
78
66
{
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 ());
87
68
}
88
69
}
89
70
You can’t perform that action at this time.
0 commit comments