Merge 1ad2d61f8b into b75ca9bc92
This commit is contained in:
commit
c703f969f1
|
|
@ -21,6 +21,9 @@ jobs:
|
|||
env:
|
||||
CHROMEDRIVER_SKIP_DOWNLOAD: true
|
||||
GECKODRIVER_SKIP_DOWNLOAD: true
|
||||
- name: Install sitespeed.io
|
||||
run: npm install sitespeed.io -g
|
||||
shell: bash
|
||||
- run: choco outdated
|
||||
- name: Show versions
|
||||
run: powershell "Get-AppxPackage -Name *MicrosoftEdge.* | Foreach Version"
|
||||
|
|
@ -33,6 +36,9 @@ jobs:
|
|||
- name: Run Edge test with scripting
|
||||
run: node bin/sitespeed.js -b edge --multi test/prepostscripts/multiWindows.cjs -n 1
|
||||
shell: cmd
|
||||
- name: Test devtools error
|
||||
run: sitespeed.io -b edge --multi test/prepostscripts/windows.cjs -n 1
|
||||
shell: bash
|
||||
- name: Run Edge test with config
|
||||
run: node bin/sitespeed.js -b edge --config test/exampleConfig.json https://www.sitespeed.io/
|
||||
shell: cmd
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
module.exports = async function(context, commands) {
|
||||
|
||||
// We fetch the selenium webdriver from context
|
||||
const webdriver = context.selenium.webdriver;
|
||||
const driver = context.selenium.driver;
|
||||
|
||||
try {
|
||||
|
||||
await commands.measure.start('homepage_trial');
|
||||
|
||||
// Navigate to a URL
|
||||
await commands.navigate('https://www.emirates.com/ae/english/');
|
||||
|
||||
await commands.measure.stop();
|
||||
|
||||
await commands.wait.byTime(2000);
|
||||
|
||||
await commands.measure.start('click_on_accept_button');
|
||||
await commands.click.byXpathAndWait('//*[@id="onetrust-accept-btn-handler"]')
|
||||
await commands.measure.stop();
|
||||
|
||||
} catch (e) {
|
||||
|
||||
commands.screenshot.take('error_screenshot')
|
||||
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue