Open boris-meerovich-sp opened 1 year ago
There is no built in support for it at the moment. However, you still should be able to respond to the security challenge manually using the APIRequestContext APIs. Leaving this open as a feature request to collect more feedback.
It would be great to have it out of the box. I have just stumbled on it and as an ugly temporary solution used powershell step with curl where I can pass -UseDefaultCredentials
directly.
There is no built in support for it at the moment. However, you still should be able to respond to the security challenge manually using the APIRequestContext APIs. Leaving this open as a feature request to collect more feedback.
Thanks for the response. Any chance you have any examples about forwarding credentials via APIRequestContext?
It would be great to have NTLM authentication support for HTTP proxy. In our case our Web application is having NTLM authentication hence all of our scenarios are blocked as of now. I would appreciate if we can prioritize NTLM authentication support for HTTP proxy, in upcoming releases.
It would be great to have it out of the box. I have just stumbled on it and as an ugly temporary solution used powershell step with curl where I can pass
-UseDefaultCredentials
directly.
I am facing the same problem with NTLM Authentication. Please could you share more information about this workaround with Curl and PowerShell? I can get it working with RestSharp by passing -UserDefaultCredentials, but couldn't find a way to pass Curl in PlayWright APIRequest.
It would be great to have it out of the box. I have just stumbled on it and as an ugly temporary solution used powershell step with curl where I can pass
-UseDefaultCredentials
directly.I am facing the same problem with NTLM Authentication. Please could you share more information about this workaround with Curl and PowerShell? I can get it working with RestSharp by passing -UserDefaultCredentials, but couldn't find a way to pass Curl in PlayWright APIRequest.
I have a TS+Pw project, I have wrapped PS part in a method:
private static async powershellCall(endpoint: string) {
const {exec} = require('child_process');
const lock = `curl -Method PUT -UseDefaultCredentials -Headers @{'Accept'='application/json';} http://${process.env.ENVIRONMENT}/api/${endpoint}`;
exec(lock, {'shell': 'powershell.exe'}, (error, stdout, stderr) => {
});
return exec;
}
It would be great to have it out of the box. I have just stumbled on it and as an ugly temporary solution used powershell step with curl where I can pass
-UseDefaultCredentials
directly.I am facing the same problem with NTLM Authentication. Please could you share more information about this workaround with Curl and PowerShell? I can get it working with RestSharp by passing -UserDefaultCredentials, but couldn't find a way to pass Curl in PlayWright APIRequest.
I have a TS+Pw project, I have wrapped PS part in a method:
private static async powershellCall(endpoint: string) { const {exec} = require('child_process'); const lock = `curl -Method PUT -UseDefaultCredentials -Headers @{'Accept'='application/json';} http://${process.env.ENVIRONMENT}/api/${endpoint}`; exec(lock, {'shell': 'powershell.exe'}, (error, stdout, stderr) => { }); return exec; }
Thanks for sharing code snippet. That's helpful. I have one more question. How you're passing this method to the PlayWright APIRequest?
I got working curl command for my API call, but not sure how I link it to PlayWright APIRequest!
Is there a way to pass curl to PlayWright API call or need to continue using curl only for API testing.
Thanks again for your time and support.
Thanks for sharing code snippet. That's helpful. I have one more question. How you're passing this method to the PlayWright APIRequest?
I am not passing it to Pw API Request, it is hidden in service and I just call it as a step in test, e.g. await commonElements.unlockElementViaApi(elementGuid);
- so it is rather nasty hack then universal solution to a NTLM problem :)
Any chance on this being implemented soon or is there perhaps an alternative way I can use NTLM auth when running the tests in TypeScript?
We are facing a similar issue trying to test an api behind windows authentication NTLM
Same challenges, Is there any update or expected release to handle this scenario
@yury-s Apologies for tagging you directly. Any plans for getting this implemented in near future? Any suggestions on how to open Web Application using playwright with NTLM authentication.
This would be very useful for my organization. NTLM is the default sign on method for us.
Any updates on this?
Anyone have any hack to over come this issue on playwright
Pls help me on this. thanks
Your question
Hi, How can I pass NTLM authentication in API testing? Now, I have only HttpCredentials to pass and I need NetworkCredential to be passed.
My API is behind the IIS Windows Authentication.
Please, advise.