Use playwright selectOption to select dropdown option
This commit is contained in:
parent
c1c94e8381
commit
daa8cd0930
|
@ -7,11 +7,7 @@ test("Self Serve", async ({ page }) => {
|
|||
const loggingToggle = explorer.frame.locator("#enableLogging-toggle-input");
|
||||
await expect(loggingToggle).toBeEnabled();
|
||||
|
||||
const regionDropdown = explorer.frame.getByText("Select a region");
|
||||
await regionDropdown.click();
|
||||
const firstOption = explorer.frame.getByRole("option").first();
|
||||
await firstOption.waitFor();
|
||||
await firstOption.click();
|
||||
explorer.frame.getByText("Select a region").selectOption({ index: 0 });
|
||||
|
||||
const currentRegionLabel = explorer.frame.getByLabel("Current Region");
|
||||
await currentRegionLabel.waitFor();
|
||||
|
|
Loading…
Reference in New Issue