Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010216
locator_is_visible.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
369 B
Referenced Files
None
Subscribers
None
locator_is_visible.ts
View Options
/* eslint-disable no-await-in-loop */
import
{
Locator
}
from
"playwright"
;
import
{
sleep
}
from
"../utils/sleep.js"
;
export
async
function
locator_is_visible
(
locator
:
Locator
,
timeout
=
500
)
:
Promise
<
boolean
>
{
let
exists
=
false
;
while
(
timeout
>
0
&&
!
exists
)
{
await
sleep
(
50
);
timeout
-=
50
;
exists
=
await
locator
.
isVisible
();
}
return
exists
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:38 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625760
Default Alt Text
locator_is_visible.ts (369 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment