Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to replicate devtools failure. #3884

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,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"
Expand All @@ -32,6 +35,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
Expand Down
28 changes: 28 additions & 0 deletions test/prepostscripts/windows.cjs
Original file line number Diff line number Diff line change
@@ -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;
}
};