Open inancgumus opened 1 year ago
The module doesn't let a target page redirect to another page, whether that page is basic-auth protected or not. This issue happens only when we set the httpCredentials option.
httpCredentials
v1.0.2
macOS 13
Chromium 113.0.5671.0 and Chrome 115.0.5790.170
No response
import { sleep } from 'k6'; import { browser } from 'k6/x/browser'; export const options = { scenarios: { ui: { executor: 'shared-iterations', options: { browser: { type: 'chromium', } }, }, } } export default async function () { const page = browser.newPage({ "httpCredentials": { "username": "admin", "password": "password", } }); try { await page.goto('http://localhost:81/static/redirect.html'); sleep(5); } finally { page.close(); } }
http://localhost:81/static/redirect.html
<html> <body> test redirect <script> document.location = "http://localhost:81/"; </script> </body> </html>
The browser module should redirect to http://localhost:81/.
http://localhost:81/
http://localhost:81/protected
Any update?
@mridiniveni This isn't our near-term goal.
Please give the issue description (above) a thumbs-up. So we can prioritize it.
Brief summary
The module doesn't let a target page redirect to another page, whether that page is basic-auth protected or not. This issue happens only when we set the
httpCredentials
option.xk6-browser version
v1.0.2
OS
macOS 13
Chrome version
Chromium 113.0.5671.0 and Chrome 115.0.5790.170
Docker version and image (if applicable)
No response
Steps to reproduce the problem
http://localhost:81/static/redirect.html
):Expected behaviour
The browser module should redirect to
http://localhost:81/
.Actual behaviour
http://localhost:81/static/redirect.html
, but it doesn't let the page redirect tohttp://localhost:81/
.http://localhost:81/protected
, instead ofhttp://localhost:81/
.httpCredentials
option from the script.