UNPKG
@christian-bromann/webdriverio
Version:
latest (4.2.23)
4.2.23
4.2.22
4.2.21
4.2.20
4.2.19
4.2.18
4.2.17
4.2.16
4.2.15
4.2.14
4.2.13
4.2.12
4.2.11
4.2.10
4.2.9
4.2.8
4.2.7
4.2.6
A nodejs bindings implementation for selenium 2.0/webdriver
webdriver.io
webdriverio/webdriverio
@christian-bromann/webdriverio
/
test
/
spec
/
desktop
/
hasFocus.js
10 lines
(8 loc)
•
319 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
describe(
'hasFocus'
, () => { it(
'should return true if element is active'
,
async
function
()
{ (
await
this
.client.hasFocus(
'[name="login"]'
)).should.be.
true
}) it(
'should return false on inactive elements'
,
async
function
()
{ (
await
this
.client.hasFocus(
'body'
)).should.be.
false
}) })