@@ -37,7 +37,15 @@ public async Task<ActionResult> IsElementDisplayed([FromRoute] string sessionId,
3737 {
3838 var session = GetActiveSession ( sessionId ) ;
3939 var element = GetElement ( session , elementId ) ;
40- return await Task . FromResult ( WebDriverResult . Success ( ! element . IsOffscreen ) ) ;
40+
41+ if ( element . Properties . IsOffscreen . IsSupported )
42+ {
43+ return await Task . FromResult ( WebDriverResult . Success ( ! element . IsOffscreen ) ) ;
44+ }
45+ else
46+ {
47+ return await Task . FromResult ( WebDriverResult . Success ( true ) ) ;
48+ }
4149 }
4250
4351 [ HttpGet ( "{elementId}/enabled" ) ]
@@ -63,10 +71,15 @@ public async Task<ActionResult> ElementClick([FromRoute] string sessionId, [From
6371 var element = GetElement ( session , elementId ) ;
6472
6573 ScrollElementContainerIntoView ( element ) ;
66- if ( ! await Wait . Until ( ( ) => ! element . IsOffscreen , session . ImplicitWaitTimeout ) )
74+
75+ if ( element . Properties . IsOffscreen . IsSupported )
6776 {
68- return ElementNotInteractable ( elementId ) ;
77+ if ( ! await Wait . Until ( ( ) => ! element . IsOffscreen , session . ImplicitWaitTimeout ) )
78+ {
79+ return ElementNotInteractable ( elementId ) ;
80+ }
6981 }
82+
7083 element . Click ( ) ;
7184
7285 return WebDriverResult . Success ( ) ;
@@ -179,9 +192,13 @@ public async Task<ActionResult> ElementSendKeys([FromRoute] string sessionId, [F
179192 var element = GetElement ( session , elementId ) ;
180193
181194 ScrollElementContainerIntoView ( element ) ;
182- if ( ! await Wait . Until ( ( ) => ! element . IsOffscreen , session . ImplicitWaitTimeout ) )
195+
196+ if ( element . Properties . IsOffscreen . IsSupported )
183197 {
184- return ElementNotInteractable ( elementId ) ;
198+ if ( ! await Wait . Until ( ( ) => ! element . IsOffscreen , session . ImplicitWaitTimeout ) )
199+ {
200+ return ElementNotInteractable ( elementId ) ;
201+ }
185202 }
186203
187204 element . Focus ( ) ;
0 commit comments