This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // proxy.ts after compilation | |
| async function p$(selector) { | |
| return pElementFactory.call(this, selector) | |
| } | |
| async function shadow$(selector) { | |
| return pElementFactory.call(this, selector) | |
| } | |
| async function p$$(selector) { | |
| return [pElementFactory.call(this, selector, 0), pElementFactory.call(this, selector, 1)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Add custom browser and Element commands here */ | |
| export {}; | |
| declare global { | |
| namespace WebdriverIO { | |
| // interface Browser { | |
| // browserCustomCommand: (arg: any) => Promise<void> | |
| // } | |
| // interface MultiRemoteBrowser { | |
| // browserCustomCommand: (arg: any) => Promise<void> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const lang = 'en' | |
| describe('element ui date picker', () => { | |
| it('set current date +60 days', () => { | |
| browser.url('https://element.eleme.io/#/en-US/component/date-picker') | |
| const datePickerInput = $('.el-date-editor>input') | |
| expect(datePickerInput).toBeClickable() | |
| const datePicker = new DatePickerElement(datePickerInput) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { declareClickCommand } from './customCommands'; | |
| export const baseConfig: WebdriverIO.Config = { | |
| bail: 0, | |
| automationProtocol: 'webdriver', | |
| hostname: 'localhost', | |
| protocol: 'http', | |
| port: 4444, | |
| path: '/wd/hub', | |
| baseUrl: '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // tslint:disable | |
| /// <reference path="./node_modules/@wdio/sync/webdriverio.d.ts" /> | |
| /// <reference path="./node_modules/@wdio/sync/webdriverio-core.d.ts" /> | |
| const merge = require('lodash/merge'); | |
| const { TimelineService } = require('wdio-timeline-reporter/timeline-service'); | |
| interface JasmineNodeOpts { | |
| defaultTimeoutInterval?: number; | |
| requires?: string[]; | |
| expectationResultHandler?: (passed: any, assertion: any) => void; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@nestjs/common'; | |
| import { remote, BrowserObject } from 'webdriverio'; | |
| import { blockStatement, numberTypeAnnotation } from '@babel/types'; | |
| import { notDeepStrictEqual } from 'assert'; | |
| import { SplitChunksPlugin } from 'webpack'; | |
| function sleep(ms: number) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Here you'll find some swipe methods for a native iOS or Android app | |
| * which can be used when you are using webdriver.io | |
| * | |
| * I work a lot based on percentages, so it is working on all screens and all devices | |
| * and I hope you understand how to use it based on the docs. | |
| * | |
| * Feel free to use it for all kinds of purposes, a star is much appreciated ;-) | |
| * | |
| * Grtz, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = (browser, capabilities, specs) => { | |
| if (!browser && browser !== null && typeof browser === 'object') { | |
| throw new TypeError("browserElement must be the WebdriverIo browser object.") | |
| } | |
| const | |
| onDesktop = capabilities.browserName !== 'iPad', | |
| onMobile = !onDesktop; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exports.config = { | |
| // ===================== | |
| // Server Configurations | |
| // ===================== | |
| // Host address of the running Selenium server. This information is usually obsolete as | |
| // WebdriverIO automatically connects to localhost. Also if you are using one of the | |
| // supported cloud services like Sauce Labs, Browserstack or Testing Bot you also don't | |
| // need to define host and port information because WebdriverIO can figure that our | |
| // according to your user and key information. However if you are using a private Selenium | |
| // backend you should define the host address, port, and path here. |
NewerOlder