Clicking Okta input type 'submit' doesn't trigger authentication when Native Automation is enabled
jbraden6075 opened this issue · 2 comments
What is your Scenario?
I am automating an internal website that uses an Okta login screen for authentication.
What is the Current behavior?
When Native Automation is enabled (by default for TestCafe), clicking the Sign In button doesn't trigger the authentication to log in and navigate to the home page of the site.
I had to set 'disableNativeAutomation' to false in my config file to be able to log into the site.
What is the Expected behavior?
Clicking the Sign In element of an Okta page triggers the authentication check and logs the user in while Native Automation is enabled for TestCafe.
What is the public URL of the test page? (attach your complete example)
Since this is an internal website and requires VPN access, as well as being an Okta sign in page, I cannot provide you the URL. Here is the form that contains all of the elements needed to sign into the site.
Sign in to EPI
What is your TestCafe test code?
test('Login', async t => {
await t
.typeText('#okta-signin-username', 'asdf')
.typeText('#okta-signin-password', 'asdf')
.click('#okta-signin-submit')
let welcomeUser = Selector('.welcome-container').find('span').withText('Welcome, asdf')
await t
.expect(welcomeUser.exists).ok()
})
Your complete configuration file
module.exports = {
src: "tests/test.js",
browsers: ["chrome"],
selectorTimeout: "5000",
assertionTimeout: "5000",
pageLoadTimeout: "30000",
preserveUrl: true,
disableNativeAutomation: true
}
Your complete test report
Running tests in:
- Chrome 129.0.0.0 / Windows 11
Getting Started
× Login
-
AssertionError: expected false to be truthy
Browser: Chrome 129.0.0.0 / Windows 11
13 |
14 |
15 | let welcomeUser = Selector('.welcome-container').find('span').withText('Welcome, asdf')
16 |
17 | await t18 | .expect(welcomeUser.exists).ok()
19 |})
Screenshots
No response
Steps to Reproduce
- Enable Native Automation for testcafe
- Navigate to an Okta sign in page
- Enter a username
- Enter a password
- Click the Sign in button
Expected: Authentication is triggered and user is logged in
Actual: Authentication is not triggered and user is not logged in
Workaround: Disabling Native Automation for testcafe and running the login method triggers authentication and the user is logged in.
TestCafe version
3.6.2
Node.js version
v20.18.0
Command-line arguments
testcafe
Browser name(s) and version(s)
Chrome 129.0.0.0
Platform(s) and version(s)
WIndows 11
Other
No response
Thank you for submitting a bug report. We would love to help you investigate the issue. Please share a simple code example that reliably reproduces the bug. For more information, read the following article: How To Create a Minimal Working Example When You Submit an Issue. We look forward to your response.