Skip to content

Commit 863ab63

Browse files
authored
fix #595: update group and event name locators (#605)
1 parent 75e7b71 commit 863ab63

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/core/src/linkedinEvents.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,9 @@ export class CreateEventActionExecutor
651651
waitUntil: "domcontentloaded",
652652
});
653653

654-
await page.locator("input[name='eventName']").waitFor({ state: "visible", timeout: 10000 });
655-
await page.locator("input[name='eventName']").fill(data.name);
654+
const nameLocator = page.locator("input[name='eventName']").or(page.getByLabel(/Event name/i)).or(page.getByRole("textbox", { name: /Event name/i })).first();
655+
await nameLocator.waitFor({ state: "visible", timeout: 10000 });
656+
await nameLocator.fill(data.name);
656657

657658
// We'd fill out the rest here, but for brevity we'll just skip
658659
// Date pickers are complex and the UI is very dynamic.

packages/core/src/linkedinGroups.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,9 @@ export class CreateGroupActionExecutor
927927
waitUntil: "domcontentloaded",
928928
});
929929

930-
await page.locator("input[name='groupName']").waitFor({ state: "visible", timeout: 10000 });
931-
await page.locator("input[name='groupName']").fill(data.name);
930+
const nameLocator = page.locator("input[name='groupName']").or(page.getByLabel(/Group name/i)).or(page.getByRole("textbox", { name: /Group name/i })).first();
931+
await nameLocator.waitFor({ state: "visible", timeout: 10000 });
932+
await nameLocator.fill(data.name);
932933

933934
if (data.description) {
934935
await page.locator("textarea[name='groupDescription']").fill(data.description);

0 commit comments

Comments
 (0)