UNPKG

@christian-bromann/webdriverio

Version:

A nodejs bindings implementation for selenium 2.0/webdriver

24 lines (18 loc) 892 B
import conf from '../../conf/index.js' describe('execute boob', () => { it('should be able to execute some js', async function () { (await this.client.execute('return document.title', [])).value.should.be.equal(conf.testPage.title) }) it('should be forgiving on giving an `args` parameter', async function () { (await this.client.execute('return document.title')).value.should.be.equal(conf.testPage.title) }) it('should be able to execute a pure function', async function () { (await this.client.execute(() => document.title)).value.should.be.equal(conf.testPage.title) }) it('should be able to take just a single function', async function () { await this.client.execute(() => { window.testThatStuff = true }); (await this.client.execute(() => window.testThatStuff)).value.should.be.true }) })