webdriver-io

Clicking links with WebdriverIO

别说谁变了你拦得住时间么 提交于 2021-02-08 10:40:23
问题 I have a web page that I am trying to test via Webdriver I/O. My question is, how do I click a couple of links via a test? Currently, I have the following: var webdriverio = require('webdriverio'); var client = webdriverio.remote(settings).init() .url('http://www.example.com') .elements('a') .then(function(links) { for (var i=0; i<links.value.length; i++) { console.log('Clicking link...'); var link = links.value[i].ELEMENT; link.click().then(function(result) { console.log('Link clicked!'); })

Clicking links with WebdriverIO

南笙酒味 提交于 2021-02-08 10:36:03
问题 I have a web page that I am trying to test via Webdriver I/O. My question is, how do I click a couple of links via a test? Currently, I have the following: var webdriverio = require('webdriverio'); var client = webdriverio.remote(settings).init() .url('http://www.example.com') .elements('a') .then(function(links) { for (var i=0; i<links.value.length; i++) { console.log('Clicking link...'); var link = links.value[i].ELEMENT; link.click().then(function(result) { console.log('Link clicked!'); })

Fullscreen in Headless Chrome using Selenium [duplicate]

扶醉桌前 提交于 2021-02-05 09:26:18
问题 This question already has answers here : How to set window-size to fullscreen for headless-chrome using chrome options? (3 answers) Closed 3 months ago . I have a number of tests in an E2E suite where a video element is fullscreened and the fullscreen status is verified. However, when running the suite headlessly, these tests fail. Screenshots of the page show the video is simply not in fullscreen, even after the fullscreen button is clicked. Is there a way to achieve fullscreen functionality

How to open settings page in the ios simulator and change the app setting using Appium

时间秒杀一切 提交于 2021-01-29 14:32:25
问题 How to open settings page in the ios simulator and go to my app setting and change the environment using Appium I am not able to find any documentation how to do this in webdriverio and appium 回答1: You can open preferences using Appium activateApp method: driver.activateApp("com.apple.Preferences"); Then just like with any other screen, search for locators and interact with them using standard methods. 来源: https://stackoverflow.com/questions/61881382/how-to-open-settings-page-in-the-ios

Puppeteer intercept request and respond in json

不羁岁月 提交于 2020-12-13 17:51:51
问题 So puppeteer provide pretty basic example of intercepting a request for a url to a pic, and responding with a different url to a different pic. Example from their doc here: https://github.com/webdriverio/webdriverio/tree/master/packages/devtools My question is I'm trying to intercept an XHR request and respond with my own json. I can't seem to find the documentation on this. It would be nice if someone can share where more documentation on this can be. Or provide examples of this. I want to

Puppeteer intercept request and respond in json

偶尔善良 提交于 2020-12-13 17:46:51
问题 So puppeteer provide pretty basic example of intercepting a request for a url to a pic, and responding with a different url to a different pic. Example from their doc here: https://github.com/webdriverio/webdriverio/tree/master/packages/devtools My question is I'm trying to intercept an XHR request and respond with my own json. I can't seem to find the documentation on this. It would be nice if someone can share where more documentation on this can be. Or provide examples of this. I want to

Puppeteer intercept request and respond in json

末鹿安然 提交于 2020-12-13 17:44:53
问题 So puppeteer provide pretty basic example of intercepting a request for a url to a pic, and responding with a different url to a different pic. Example from their doc here: https://github.com/webdriverio/webdriverio/tree/master/packages/devtools My question is I'm trying to intercept an XHR request and respond with my own json. I can't seem to find the documentation on this. It would be nice if someone can share where more documentation on this can be. Or provide examples of this. I want to

Puppeteer intercept request and respond in json

亡梦爱人 提交于 2020-12-13 17:44:09
问题 So puppeteer provide pretty basic example of intercepting a request for a url to a pic, and responding with a different url to a different pic. Example from their doc here: https://github.com/webdriverio/webdriverio/tree/master/packages/devtools My question is I'm trying to intercept an XHR request and respond with my own json. I can't seem to find the documentation on this. It would be nice if someone can share where more documentation on this can be. Or provide examples of this. I want to