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

Feature Request: Authenticate Programmatically #523

Open
risapisa opened this issue Aug 30, 2023 · 0 comments
Open

Feature Request: Authenticate Programmatically #523

risapisa opened this issue Aug 30, 2023 · 0 comments

Comments

@risapisa
Copy link

Hello WDI5 colleagues,

I have a request to bypass the given wdi5:authentication setup from the configuration file, and instead let a user login via their chosen authentication provider (i.e. BTP) programmatically, within the test suite itself.

In UIVeri5, we do this by calling a helper function to directly logon to the BTP Launchpad from the 'beforeAll' hook in a test:

iLoginToTheLaunchpad: (oLaunchpad) => {
    browser.get(oLaunchpad.url + sLaunchpadHomePath, {
        auth: {
            'sapcloud-form': {
                userFieldSelector: 'input[id="j_username"]',
                passFieldSelector: 'input[id="j_password"]',
                logonButtonSelector: 'button[id="logOnFormSubmit"]',
                user: oLaunchpad.user,
                pass: oLaunchpad.password
            }
        }
    });
}

In the UIVeri5 configuration file, we do not provide logon credentials. Instead we provide the credentials from an environment-variables Javascript file which is read in the tests.

Is this something that could be provided in WDI5 as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants