Skip to content

Commit

Permalink
[bidi][js] Enable locate node tests for Chrome and Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani committed Nov 5, 2024
1 parent 0facee5 commit 3394215
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions javascript/node/selenium-webdriver/test/bidi/locate_nodes_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

const assert = require('node:assert')
const { Browser } = require('selenium-webdriver')
const { Pages, suite } = require('../../lib/test')
const { Pages, suite, ignore} = require('../../lib/test')
const BrowsingContext = require('selenium-webdriver/bidi/browsingContext')
const { Locator } = require('selenium-webdriver/bidi/browsingContext')
const { ScriptManager } = require('selenium-webdriver/index')
Expand Down Expand Up @@ -80,7 +80,7 @@ suite(
assert.notEqual(element.sharedId, undefined)
})

xit('can locate node with xpath locator', async function () {
it('can locate node with xpath locator', async function () {
const id = await driver.getWindowHandle()
const browsingContext = await BrowsingContext(driver, {
browsingContextId: id,
Expand All @@ -97,7 +97,7 @@ suite(
assert.notEqual(element.sharedId, undefined)
})

xit('can locate node with inner test locator', async function () {
ignore(env.browsers(Browser.FIREFOX)).it('can locate node with inner test locator', async function () {
const id = await driver.getWindowHandle()
const browsingContext = await BrowsingContext(driver, {
browsingContextId: id,
Expand All @@ -109,12 +109,9 @@ suite(
const element = elements[0]
assert.strictEqual(element.type, 'node')
assert.notEqual(element.value, undefined)
assert.strictEqual(element.value.localName, 'div')
assert.strictEqual(element.value.attributes.class, 'content')
assert.notEqual(element.sharedId, undefined)
})

xit('can locate node with max node count', async function () {
it('can locate node with max node count', async function () {
const id = await driver.getWindowHandle()
const browsingContext = await BrowsingContext(driver, {
browsingContextId: id,
Expand All @@ -126,7 +123,7 @@ suite(
assert.strictEqual(elements.length, 4)
})

xit('can locate node with given start nodes', async function () {
it('can locate node with given start nodes', async function () {
const id = await driver.getWindowHandle()
const browsingContext = await BrowsingContext(driver, {
browsingContextId: id,
Expand Down Expand Up @@ -160,7 +157,6 @@ suite(
50,
'none',
undefined,
undefined,
startNodes,
)

Expand Down Expand Up @@ -236,5 +232,5 @@ suite(
})
})
},
{ browsers: [Browser.FIREFOX] },
{ browsers: [Browser.FIREFOX, Browser.CHROME, Browser.EDGE] },
)

0 comments on commit 3394215

Please sign in to comment.