File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
bellatrix.web/src/main/java/solutions/bellatrix/web/components/shadowdom
framework-tests/bellatrix.web.tests/src/test/java/controls/shadowdom Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1515
1616import lombok .experimental .UtilityClass ;
1717import org .openqa .selenium .By ;
18+ import org .openqa .selenium .NoSuchElementException ;
1819import solutions .bellatrix .core .configuration .ConfigurationService ;
1920import solutions .bellatrix .core .utilities .InstanceFactory ;
2021import solutions .bellatrix .core .utilities .Ref ;
@@ -261,7 +262,7 @@ private static <TComponent extends WebComponent> TComponent retryFindingSingleCo
261262 throw new RuntimeException (e );
262263 }
263264 } else {
264- throw new IllegalArgumentException ("No element inside the shadow DOM was found with the findStrategy: " + findStrategy .toString ());
265+ throw new NoSuchElementException ("No element inside the shadow DOM was found with the findStrategy: " + findStrategy .toString ());
265266 }
266267 }
267268
Original file line number Diff line number Diff line change 44import org .junit .jupiter .api .Assertions ;
55import org .junit .jupiter .api .BeforeEach ;
66import org .junit .jupiter .api .Test ;
7+ import org .openqa .selenium .NoSuchElementException ;
78import solutions .bellatrix .core .configuration .ConfigurationService ;
89import solutions .bellatrix .web .components .Anchor ;
910import solutions .bellatrix .web .components .Div ;
@@ -112,7 +113,7 @@ public void exceptionThrown_when_tryingToFindNonExistentElement() {
112113 var shadowHost = app ().create ().byId (Div .class , "complexShadowHost" );
113114 var shadowRoot = shadowHost .getShadowRoot ();
114115
115- Assertions .assertThrows (IllegalArgumentException .class , () -> shadowRoot .createByXPath (Div .class , "//nonExistentElement" ));
116+ Assertions .assertThrows (NoSuchElementException .class , () -> shadowRoot .createByXPath (Div .class , "//nonExistentElement" ));
116117 }
117118
118119 @ Test
You can’t perform that action at this time.
0 commit comments