Repository navigation
fix(agent): turn Workday's Create Account over to Sign In before signing in (#450) — v1.68.3 #451
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,6 +172,11 @@ public async Task EnterWorkdayAsync() | |
| await Auto(Page, "SignInWithEmailButton").First.ClickAsync(new() { Timeout = 5_000 }); | ||
| await WaitVisibleAsync(Page.Locator("input[type='password']"), 8_000); | ||
| } | ||
| // Step 1 of the flow is fetched after the flow page is drawn — blank for ~7 s on | ||
| // finastra.wd3 — so whatever it shows is waited for, not glanced at (#450). | ||
| await WaitVisibleAsync(Page.Locator("[data-automation-id='signInSubmitButton'], [data-automation-id='verifyPassword'], " | ||
| + "[data-automation-id='SignInWithEmailButton'], [data-automation-id='pageFooterNextButton']"), 30_000); | ||
| await FlipWorkdayCreateAccountToSignInAsync(Page); | ||
| // The form is drawn before its script is listening: filled the instant the password | ||
| // box appears, Sign In sent nothing and the page stayed as it was, with no complaint | ||
| // (checked against nvidia.wd5 — a 2.5 s settle, or typing key by key, and it signs in). | ||
|
|
@@ -182,6 +187,27 @@ public async Task EnterWorkdayAsync() | |
| catch (TimeoutException) { /* ditto */ } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// A tenant that opens step 1 on Create Account (finastra.wd3, 2026-10-13) draws the same | ||
| /// email and password boxes as its Sign In, plus "Verify New Password" and a "Sign In" link | ||
| /// that turns the form over. Typed into as it stood, the saved password went into Create | ||
| /// Account and the link was pressed as the sign-in button, so the form flipped empty and | ||
| /// the sign-in was judged refused (#450). The link is pressed first, and the sign-in waited for. | ||
| /// </summary> | ||
| internal static async Task FlipWorkdayCreateAccountToSignInAsync(IPage page) | ||
| { | ||
| try | ||
| { | ||
| var verify = page.Locator("[data-automation-id='verifyPassword']"); | ||
| var link = page.Locator("[data-automation-id='signInLink']"); | ||
| if (await verify.CountAsync() == 0 || !await verify.First.IsVisibleAsync() || await link.CountAsync() == 0) return; | ||
| await link.First.ClickAsync(new() { Timeout = 5_000 }); | ||
| await WaitVisibleAsync(page.Locator("[data-automation-id='signInSubmitButton']"), 8_000); | ||
| } | ||
| catch (PlaywrightException) { /* judged by what the sign-in finds */ } | ||
| catch (TimeoutException) { /* ditto */ } | ||
| } | ||
|
|
||
| /// <summary>A page drawn by Workday's career site, wherever it is served from: its way in and | ||
| /// its wizard footer carry the same data-automation-ids on every tenant.</summary> | ||
| private static async Task<bool> LooksLikeWorkdayAsync(IPage page) | ||
|
|
@@ -1189,6 +1215,10 @@ private async Task<bool> TrySignInAsync(BoardAccount? with = null) | |
| // The username box, best name first — a CSS list is matched in DOM order, and the | ||
| // careers site's search box comes before the sign-in on the page. Never a widget's. | ||
| const string notWidget = ":not([type='search']):not([name*='search' i]):not([id*='search' i]):not([placeholder*='search' i]):not([class*='search' i])"; | ||
| // Workday's Create Account carries the same boxes as its Sign In: turned over first, | ||
| // so the visible boxes found below are the sign-in's (#450). | ||
| var typed = IsWorkday(host) || await LooksLikeWorkdayAsync(Page); | ||
| if (typed) await FlipWorkdayCreateAccountToSignInAsync(Page); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Stop credential entry unless Create Account changed to Sign In. When 🤖 Prompt for AI Agents |
||
| ILocator? userBox = null; | ||
| foreach (var sel in new[] | ||
| { | ||
|
|
@@ -1212,7 +1242,6 @@ private async Task<bool> TrySignInAsync(BoardAccount? with = null) | |
| } | ||
| // Workday's form takes what is typed, key by key, every time; a fill — the value set | ||
| // in one go — it sometimes never hears, and Sign In then sends nothing (#443). | ||
| var typed = IsWorkday(host) || await LooksLikeWorkdayAsync(Page); | ||
| if (typed) | ||
| { | ||
| await userBox.ClickAsync(new() { Timeout = 5_000 }); | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: CryptoJones/OSApplyTrack
Length of output: 4137
Delay Create Account until after the earlier Workday waits.
Create Account appears after 1.2 seconds, but
EnterWorkdayAsynccan spend up to 14 seconds on its earlier control waits. The regression test can therefore reach Review without exercising the new 30-second wait. Delay Create Account beyond 14 seconds but below 30 seconds, such as 16 seconds.Suggested fixture timing change
📝 Committable suggestion
🤖 Prompt for AI Agents