This commit is contained in:
Peter Hedenskog 2025-10-12 15:25:44 +05:30 committed by GitHub
commit c703f969f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 34 additions and 0 deletions

View File

@ -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

View File

@ -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;
}
};