Commit 4d5eec59 authored by nanahira's avatar nanahira

fix

parent 0c57c404
Pipeline #23682 failed with stages
......@@ -854,7 +854,9 @@ async function getOpenAIAuth({
if (email && password) {
await waitForConditionOrAtCapacity(
page,
() => page.waitForSelector("#__next .btn-primary", { timeout: timeoutMs })
() => page.waitForSelector("#__next button:first-child", {
timeout: timeoutMs
})
);
await delay(500);
do {
......@@ -863,7 +865,7 @@ async function getOpenAIAuth({
waitUntil: "networkidle2",
timeout: timeoutMs
}),
page.click("#__next .btn-primary")
page.click("#__next button:first-child")
]);
await delay(500);
} while (page.url().endsWith("/auth/login"));
......@@ -882,7 +884,7 @@ async function getOpenAIAuth({
]);
await page.waitForSelector('input[type="password"]', { visible: true });
await page.type('input[type="password"]', password);
await delay(50);
await delay(200);
submitP = () => page.keyboard.press("Enter");
} else if (isMicrosoftLogin) {
await page.click('button[data-provider="windowslive"]');
......@@ -895,7 +897,7 @@ async function getOpenAIAuth({
await delay(1500);
await page.waitForSelector('input[type="password"]', { visible: true });
await page.type('input[type="password"]', password);
await delay(50);
await delay(200);
submitP = () => page.keyboard.press("Enter");
await Promise.all([
page.waitForNavigation(),
......@@ -928,16 +930,21 @@ async function getOpenAIAuth({
}
await delay(2e3);
const frame = page.mainFrame();
const submit = await page.waitForSelector('button[type="submit"]', {
timeout: timeoutMs
});
await frame.focus('button[type="submit"]');
const submit = await page.waitForSelector(
'button[type="submit"][data-action-button-primary="true"]',
{
timeout: timeoutMs
}
);
await frame.focus(
'button[type="submit"][data-action-button-primary="true"]'
);
await submit.focus();
await submit.click();
await page.waitForSelector("#password", { timeout: timeoutMs });
await page.type("#password", password);
await delay(200);
submitP = () => page.click('button[type="submit"]');
submitP = () => page.click('button[type="submit"][data-action-button-primary="true"]');
}
await Promise.all([
waitForConditionOrAtCapacity(
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment