Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/javascript/selenium-webdriver/test/edge/service_test.js
2885 views
1
// Licensed to the Software Freedom Conservancy (SFC) under one
2
// or more contributor license agreements. See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership. The SFC licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License. You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied. See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
'use strict'
19
20
const assert = require('node:assert')
21
const edge = require('selenium-webdriver/edge')
22
const test = require('../../lib/test')
23
const { getBinaryPaths } = require('selenium-webdriver/common/driverFinder')
24
25
test.suite(
26
function (_env) {
27
describe('msedgedriver', function () {
28
let service
29
30
afterEach(function () {
31
if (service) {
32
return service.kill()
33
}
34
})
35
36
it('can start msedgedriver', async function () {
37
service = new edge.ServiceBuilder().build()
38
service.setExecutable(getBinaryPaths(new edge.Options()).driverPath)
39
let url = await service.start()
40
assert(/127\.0\.0\.1/.test(url), `unexpected url: ${url}`)
41
})
42
})
43
},
44
{ browsers: ['MicrosoftEdge'] },
45
)
46
47