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

Taiko/Gauge - The Header Basic Authorization is getting mixed with the form Login #2650

Open
jawaharsan opened this issue Oct 11, 2022 · 1 comment

Comments

@jawaharsan
Copy link

In Taiko/Gauge Framework, we try to implement Basic Authorization with Base64 encoding method to launch a website. It works fine. But, when we try to login as a user which is a form on the application flow, it is not getting logged in. When we do it manually, there is no issue.

The code is something like this.

goto(url,{headers:{'Authorization':'Basic <Base64encodedcreds>'}}) => This works well.
On the login page, I need to give the user name (EmailID) and password as below:

await write("EmailID", into(textBox{id:"IDValueEmail"}));
await write("Password", into(textBox{id:"IDValuePassword"}));
await evaluate($(customelocatorSignin), ele => ele.click());

I have the following questions:
How to overwrite the password set for the URL using headers? I am not able to login with the particular valid credentials as a user on the login page. It just stays on the same page without throwing any error. How to resolve this issue?

@marques-work
Copy link
Contributor

I would think you'd need to unset the headers before filling/submitting the form.

Though I'm not sure why you would need both basic auth and a form login? Wouldn't you use one or the other?

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

No branches or pull requests

2 participants