Skip to content
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

Clicking Okta input type 'submit' doesn't trigger authentication when Native Automation is enabled #8296

Open
jbraden6075 opened this issue Oct 10, 2024 · 1 comment
Labels
STATE: Need clarification An issue lacks information for further research. STATE: Need simple sample A simple sample is required to examine the issue. TYPE: bug The described behavior is considered as wrong (bug).

Comments

@jbraden6075
Copy link

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

<iframe name="iframe18" style="display:none"></iframe>

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

  1. 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 t

    18 | .expect(welcomeUser.exists).ok()
    19 |})

Screenshots

No response

Steps to Reproduce

  1. Enable Native Automation for testcafe
  2. Navigate to an Okta sign in page
  3. Enter a username
  4. Enter a password
  5. 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

@jbraden6075 jbraden6075 added the TYPE: bug The described behavior is considered as wrong (bug). label Oct 10, 2024
@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Oct 10, 2024
@Bayheck Bayheck added STATE: Need simple sample A simple sample is required to examine the issue. and removed STATE: Need response An issue that requires a response or attention from the team. labels Oct 14, 2024
Copy link

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.

@github-actions github-actions bot added the STATE: Need clarification An issue lacks information for further research. label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Need clarification An issue lacks information for further research. STATE: Need simple sample A simple sample is required to examine the issue. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants