- WebdriverIO - Discussion
- WebdriverIO - Useful Resources
- WebdriverIO - Quick Guide
- Generate HTML reports from Allure
- Execute Tests with Mocha Options
- Running Tests from command-line parameters
- WebdriverIO - Data Driven Testing
- WebdriverIO - Running Tests in Parallel
- WebdriverIO - Waits
- WebdriverIO - JavaScript Executor
- WebdriverIO - Capturing Screenshots
- WebdriverIO - Debugging Code
- WebdriverIO - Alerts
- WebdriverIO - Scrolling Operations
- WebdriverIO - Multiple Windows/Tabs
- Chai Assertions on webelements
- WebdriverIO - Handling Radio Buttons
- WebdriverIO - Cookies
- WebdriverIO - Double Click
- WebdriverIO - Drag & Drop
- WebdriverIO - Frames
- WebdriverIO - Hidden Elements
- Handling Child Windows/Pop ups
- WebdriverIO - Mouse Operations
- Handling Checkboxes & Dropdowns
- WebdriverIO - Browser Navigation Commands
- WebdriverIO - Handling Browser Size
- WebdriverIO - General Browser Commands
- WebdriverIO - Happy Path Flow
- Expect Statement for Assertions
- WebdriverIO - Name Locator
- WebdriverIO - Class Name Locator
- WebdriverIO - Tag Name Locator
- WebdriverIO - ID Locator
- WebdriverIO - Link Text Locator
- WebdriverIO - CSS Locator
- WebdriverIO - Xpath Locator
- WebdriverIO - Wdio.conf.js file
- WebdriverIO - VS Code Intellisense
- WebdriverIO - Configuration File generation
- Selenium Standalone Server Installation
- WebdriverIO - Mocha Installation
- WebdriverIO - Package.json
- WebdriverIO - VS Code Installation
- WebdriverIO - Installation of NPM
- WebdriverIO - Getting Started with NodeJS
- WebdriverIO - Architecture
- WebdriverIO - Prerequisite
- WebdriverIO - Introduction
- WebdriverIO - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
WebdriverIO - Handpng Child Windows/Pop ups
一个新的儿童窗口可以点击连接点或 but子。 网上用户信息管理系统(WebdriverIO)因疏忽而控制了主要浏览器窗口,以便进入儿童窗户,必须从主页转向儿童窗口。
与儿童窗口合作的一些方法如下:
browser.getWindowHandles()
这种方法使目前开放的浏览器窗口的窗口能够以清单的形式处理。 如果有两个开放窗口,则名单的零指数有母窗户的开户,第一个指数应标明儿童的窗户。
Syntax
The syntax is as follows -
var x = browser.getWindowHandles()
browser.getWindowHandle()
这种方法产生窗口处理重点的浏览器。
Syntax
The syntax is as follows -
let l = browser.getWindowHandle()
browser.switch ToWindow( <window Hand id>>
这种方法将重点从一个浏览器窗口转移到另一个开放的窗口,其窗户处理id,作为参数,通过这种方法。
Syntax
The syntax is as follows -
browser.switchToWindow(x)
在以下图象中,在用 Apple果纽顿点击标时,一个儿童窗口打开了浏览器,在 Apple果国际发展中标有浏览器。 让我们努力转向儿童窗口和进入那里的人。
首先,遵循题为“快车道”的一章第1至5号步骤。
Step 5——建立光谱档案。 关于如何安装这些装置的细节见题为“Mocha装置”的章节。
// test suite name describe( Tutorialspoint apppcation , function(){ //test case it( Child Window , function(){ // launch url browser.url( https://secure.indeed.com/account/login ) //identify element then cpck $( #apple-signin-button ).cpck() //get all window handle ids in pst var l = browser.getWindowHandles() //switch to child window browser.switchToWindow(l[1]) //get page title of child window console.log(browser.getTitle() + - Page title of child window ) //close child window browser.closeWindow() //switch to parent window browser.switchToWindow(l[0]) //get page title of parent window console.log(browser.getTitle() + - Page title of parent window ) }); });
档案——由以下指挥部存档:
npx wdio run wdio.conf.js
在题为“Wdio.conf.js案”的章节和题为“编造档案”的章节中详细讨论了如何建立汇编档案的细节。
以下屏幕将登在你的电脑上:
指挥工作成功执行后,首先,儿童窗户的首页标题——用 Apple果笔记号印在哥索尔。 然后,母窗的页标题——“签字人的确账户”在康索尔印刷。
Advertisements