Skip to content

Chrome 137 #2912

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

Open
wants to merge 23 commits into
base: master
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: 4 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ jobs:
Xvfb :1 -screen 5 1024x768x8 &
export DISPLAY=:1.5
cd lib/PuppeteerSharp.Tests
dotnet test -s test.runsettings -c Debug --logger "trx;LogFileName=TestResults.xml" --blame-hang-timeout 300000
dotnet tool update -g dotnet-retest
dotnet retest --verbosity normal -- -s test.runsettings -c Debug --logger "trx;LogFileName=TestResults.xml" --blame-hang-timeout 300000
- name: Test (Windows)
if: matrix.os == 'windows-latest'
env:
BROWSER: ${{ matrix.browser }}
HEADLESS_MODE: ${{ matrix.mode }}
run: |
cd .\lib\PuppeteerSharp.Tests
dotnet test -s test.runsettings --blame-hang-timeout 300000
dotnet tool update -g dotnet-retest
dotnet retest --verbosity normal -- -s test.runsettings --blame-hang-timeout 300000

Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@
"comment": "Querying by a11y attributes is not standard behavior"
},
{
"testIdPattern": "[bfcache.spec] BFCache can navigate to a BFCached page containing an OOPIF and a worker",
"testIdPattern": "[bfcache.spec] *",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "firefox"],
"expectations": ["SKIP"],
Expand Down Expand Up @@ -1622,32 +1622,11 @@
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
},
{
"testIdPattern": "[extensions.spec] extensions background_page target type should be available",
"testIdPattern": "[extensions.spec] extensions *",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "firefox"],
"expectations": ["SKIP"],
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
},
{
"testIdPattern": "[extensions.spec] extensions service_worker target type should be available",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "firefox"],
"expectations": ["SKIP"],
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
},
{
"testIdPattern": "[extensions.spec] extensions target.page() should return a background_page",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "firefox"],
"expectations": ["SKIP"],
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
},
{
"testIdPattern": "[extensions.spec] extensions target.page() should return a background_page",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "chrome"],
"expectations": ["FAIL", "PASS"],
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
"comment": "Chrome-specific test"
},
{
Comment on lines +1625 to 1631
Copy link
Preview

Copilot AI Jun 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a wildcard pattern for testIdPattern may unintentionally skip additional tests; consider narrowing the pattern or creating separate entries for each test case to prevent accidental skips.

Copilot uses AI. Check for mistakes.

"testIdPattern": "[fixtures.spec] Fixtures should close the browser when the node process closes",
Expand Down Expand Up @@ -3732,25 +3711,18 @@
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
},
{
"testIdPattern": "[extensions.spec] extensions background_page target type should be available",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "chrome", "chrome-headless-shell"],
"expectations": ["SKIP"],
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
},
{
"testIdPattern": "[extensions.spec] extensions service_worker target type should be available",
"platforms": ["darwin", "linux", "win32"],
"testIdPattern": "[mouse.spec] Mouse should select the text with mouse",
"platforms": ["win32"],
"parameters": ["cdp", "chrome", "chrome-headless-shell"],
"expectations": ["SKIP"],
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
"expectations": ["FAIL"],
"comment": "TODO: started to fail with Chrome headless shell 135 on Windows"
},
{
"testIdPattern": "[extensions.spec] extensions target.page() should return a background_page",
"testIdPattern": "[extensions.spec] extensions *",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "chrome", "chrome-headless-shell"],
"expectations": ["SKIP"],
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
"comment": "No extensions in chrome-headless-shell"
},
{
"testIdPattern": "[network.spec] network Network Events Page.Events.Request",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<script>
function unused(){}console.log('used!');</script>
function unused(){}console.log('used!');if(true===false)console.log('unused!');</script>
32 changes: 16 additions & 16 deletions lib/PuppeteerSharp.Tests/AccessibilityTests/AccessibilityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace PuppeteerSharp.Tests.AccessibilityTests
{
public class AccessibilityTests : PuppeteerPageBaseTest
{
[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "should work")]
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "should work")]
public async Task ShouldWork()
{
await Page.SetContentAsync(@"
Expand Down Expand Up @@ -107,7 +107,7 @@ await Page.SetContentAsync(@"
Assert.That(snapshot, Is.EqualTo(nodeToCheck));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "should report uninteresting nodes")]
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "should report uninteresting nodes")]
public async Task ShouldReportUninterestingNodes()
{
await Page.SetContentAsync("<textarea autofocus>hi</textarea>");
Expand Down Expand Up @@ -151,7 +151,7 @@ public async Task ShouldReportUninterestingNodes()
}));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "get snapshots while the tree is re-calculated")]
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "get snapshots while the tree is re-calculated")]
public async Task GetSnapshotsWhileTheTreeIsReCalculated()
{
await Page.SetContentAsync(@"
Expand Down Expand Up @@ -201,7 +201,7 @@ private async Task<string> GetAccessibleNameAsync(IPage page, IElementHandle ele
})).Name;
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "roledescription")]
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "roledescription")]
public async Task RoleDescription()
{
await Page.SetContentAsync("<div tabIndex=-1 aria-roledescription='foo'>Hi</div>");
Expand All @@ -210,39 +210,39 @@ public async Task RoleDescription()
Assert.That(snapshot.Children[0].RoleDescription, Is.Null);
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "orientation")]
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "orientation")]
public async Task Orientation()
{
await Page.SetContentAsync("<a href='' role='slider' aria-orientation='vertical'>11</a>");
var snapshot = await Page.Accessibility.SnapshotAsync();
Assert.That(snapshot.Children[0].Orientation, Is.EqualTo("vertical"));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "autocomplete")]
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "autocomplete")]
public async Task AutoComplete()
{
await Page.SetContentAsync("<input type='number' aria-autocomplete='list' />");
var snapshot = await Page.Accessibility.SnapshotAsync();
Assert.That(snapshot.Children[0].AutoComplete, Is.EqualTo("list"));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "multiselectable")]
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "multiselectable")]
public async Task MultiSelectable()
{
await Page.SetContentAsync("<div role='grid' tabIndex=-1 aria-multiselectable=true>hey</div>");
var snapshot = await Page.Accessibility.SnapshotAsync();
Assert.That(snapshot.Children[0].Multiselectable, Is.True);
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "Accessibility", "keyshortcuts")]
[Test, PuppeteerTest("accessibility.spec", "Accessibility", "keyshortcuts")]
public async Task KeyShortcuts()
{
await Page.SetContentAsync("<div role='grid' tabIndex=-1 aria-keyshortcuts='foo'>hey</div>");
var snapshot = await Page.Accessibility.SnapshotAsync();
Assert.That(snapshot.Children[0].KeyShortcuts, Is.EqualTo("foo"));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "should not report text nodes inside controls")]
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "should not report text nodes inside controls")]
public async Task ShouldNotReportTextNodesInsideControls()
{
await Page.SetContentAsync(@"
Expand Down Expand Up @@ -271,7 +271,7 @@ await Page.Accessibility.SnapshotAsync(),
}));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "rich text editable fields should have children")]
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "rich text editable fields should have children")]
public async Task RichTextEditableFieldsShouldHaveChildren()
{
await Page.SetContentAsync(@"
Expand Down Expand Up @@ -299,7 +299,7 @@ await Page.SetContentAsync(@"
}));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "rich text editable fields with role should have children")]
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "rich text editable fields with role should have children")]
public async Task RichTextEditableFieldsWithRoleShouldHaveChildren()
{
await Page.SetContentAsync(@"
Expand All @@ -324,7 +324,7 @@ await Page.SetContentAsync(@"
}));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "plaintext contenteditable", "plain text field with role should not have children")]
[Test, PuppeteerTest("accessibility.spec", "plaintext contenteditable", "plain text field with role should not have children")]
public async Task PlainTextFieldWithRoleShouldNotHaveChildren()
{
await Page.SetContentAsync("<div contenteditable='plaintext-only' role='textbox'>Edit this image:<img src='fakeimage.png' alt='my fake image'></div>");
Expand All @@ -339,7 +339,7 @@ public async Task PlainTextFieldWithRoleShouldNotHaveChildren()
}));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "plaintext contenteditable", "plain text field with tabindex and without role should not have content")]
[Test, PuppeteerTest("accessibility.spec", "plaintext contenteditable", "plain text field with tabindex and without role should not have content")]
public async Task PlainTextFieldWithoutRoleShouldNotHaveContent()
{
await Page.SetContentAsync(
Expand All @@ -349,7 +349,7 @@ await Page.SetContentAsync(
Assert.That(snapshot.Children[0].Name, Is.EqualTo(string.Empty));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "non editable textbox with role and tabIndex and label should not have children")]
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "non editable textbox with role and tabIndex and label should not have children")]
public async Task NonEditableTextboxWithRoleAndTabIndexAndLabelShouldNotHaveChildren()
{
await Page.SetContentAsync(@"
Expand All @@ -367,7 +367,7 @@ this is the inner content
}));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "checkbox with and tabIndex and label should not have children")]
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "checkbox with and tabIndex and label should not have children")]
public async Task CheckboxWithAndTabIndexAndLabelShouldNotHaveChildren()
{
await Page.SetContentAsync(@"
Expand All @@ -385,7 +385,7 @@ this is the inner content
}));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "checkbox without label should not have children")]
[Test, PuppeteerTest("accessibility.spec", "filtering children of leaf nodes", "checkbox without label should not have children")]
public async Task CheckboxWithoutLabelShouldNotHaveChildren()
{
await Page.SetContentAsync(@"
Expand Down
10 changes: 5 additions & 5 deletions lib/PuppeteerSharp.Tests/AccessibilityTests/RootOptionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace PuppeteerSharp.Tests.AccessibilityTests
{
public class RootOptionTests : PuppeteerPageBaseTest
{
[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should work a button")]
[Test, PuppeteerTest("accessibility.spec", "root option", "should work a button")]
public async Task ShouldWorkAButton()
{
await Page.SetContentAsync("<button>My Button</button>");
Expand All @@ -22,7 +22,7 @@ await Page.Accessibility.SnapshotAsync(new AccessibilitySnapshotOptions { Root =
}));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should work an input")]
[Test, PuppeteerTest("accessibility.spec", "root option", "should work an input")]
public async Task ShouldWorkAnInput()
{
await Page.SetContentAsync("<input title='My Input' value='My Value'>");
Expand All @@ -38,7 +38,7 @@ await Page.Accessibility.SnapshotAsync(new AccessibilitySnapshotOptions { Root =
}));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should work a menu")]
[Test, PuppeteerTest("accessibility.spec", "root option", "should work a menu")]
public async Task ShouldWorkAMenu()
{
await Page.SetContentAsync(@"
Expand Down Expand Up @@ -79,7 +79,7 @@ await Page.SetContentAsync(@"
Assert.That(snapshot, Is.EqualTo(nodeToCheck));
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should return null when the element is no longer in DOM")]
[Test, PuppeteerTest("accessibility.spec", "root option", "should return null when the element is no longer in DOM")]
public async Task ShouldReturnNullWhenTheElementIsNoLongerInDOM()
{
await Page.SetContentAsync("<button>My Button</button>");
Expand All @@ -88,7 +88,7 @@ public async Task ShouldReturnNullWhenTheElementIsNoLongerInDOM()
Assert.That(await Page.Accessibility.SnapshotAsync(new AccessibilitySnapshotOptions { Root = button }), Is.Null);
}

[Test, Retry(2), PuppeteerTest("accessibility.spec", "root option", "should support the interestingOnly option")]
[Test, PuppeteerTest("accessibility.spec", "root option", "should support the interestingOnly option")]
public async Task ShouldSupportTheInterestingOnlyOption()
{
await Page.SetContentAsync("<div><button>My Button</button></div>");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace PuppeteerSharp.Tests.AriaQueryHandlerTests
{
public class ParseAriaSelectorTests : PuppeteerPageBaseTest
{
[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle non-breaking spaces")]
[Test, PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle non-breaking spaces")]
public async Task ShouldHandleNonBreakingSpaces()
{
await Page.SetContentAsync(
Expand All @@ -19,7 +19,7 @@ await Page.SetContentAsync(
Assert.That(button, Is.Null);
}

[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle non-breaking spaces")]
[Test, PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle non-breaking spaces")]
public async Task ShouldHandleNonBreakingSpaces2()
{
await Page.SetContentAsync(
Expand All @@ -32,7 +32,7 @@ await Page.SetContentAsync(
await ExpectFound(button);
}

[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle zero width spaces")]
[Test, PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should handle zero width spaces")]
public async Task ShouldHandleZeroWidthSpaces()
{
await Page.SetContentAsync(
Expand All @@ -45,7 +45,7 @@ await Page.SetContentAsync(
Assert.That(button, Is.Null);
}

[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should find button")]
[Test, PuppeteerTest("ariaqueryhandler.spec", "parseAriaSelector", "should find button")]
public async Task ShouldFindButton()
{
await Page.SetContentAsync(@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public QueryAllArrayTests() : base()
{
}

[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "queryAllArray", "$$eval should handle many elements")]
[Test, PuppeteerTest("ariaqueryhandler.spec", "queryAllArray", "$$eval should handle many elements")]
public async Task EvalShouldHandleManyElements()
{
await Page.SetContentAsync("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace PuppeteerSharp.Tests.AriaQueryHandlerTests
{
public class QueryAllTests : PuppeteerPageBaseTest
{
[Test, Retry(2), PuppeteerTest("ariaqueryhandler.spec", "queryAll", "should find menu by name")]
[Test, PuppeteerTest("ariaqueryhandler.spec", "queryAll", "should find menu by name")]
public async Task ShouldFindMenuByName()
{
await Page.SetContentAsync(@"
Expand Down
Loading
Loading