Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/Playwright/Core/Selectors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public async Task RegisterAsync(string name, SelectorsRegisterOptions? options =
{
engine["contentScript"] = options.ContentScript;
}
foreach (var context in _contextsForSelectors)
foreach (var context in _contextsForSelectors.ToArray())
{
await context.SendMessageToServerAsync("registerSelectorEngine", new Dictionary<string, object?>
{
Expand All @@ -67,7 +67,7 @@ public void SetTestIdAttribute(string attributeName)
{
Locator.SetTestIdAttribute(attributeName);
_testIdAttributeName = attributeName;
foreach (var context in _contextsForSelectors)
foreach (var context in _contextsForSelectors.ToArray())
{
context.SendMessageToServerAsync(
"setTestIdAttributeName",
Expand Down
Loading