getgauge / taiko

A node.js library for testing modern web applications
https://taiko.dev
MIT License
3.59k stars 453 forks source link

Issue with goto Redirecting to HTTPS in Taiko #2738

Open SysoutLucas opened 2 months ago

SysoutLucas commented 2 months ago

I am encountering an issue with the goto function in Taiko. When trying to navigate to a URL using goto, the browser automatically redirects to the HTTPS version of the site, even though the URL specified is HTTP.

Here are the details of the problem:

URL Used: http://aetespecial.detran.ce.gov.br/ Expected Behavior: The browser should navigate to the specified HTTP URL without redirecting to HTTPS. Actual Behavior: The browser automatically redirects to the HTTPS version of the URL. I have tried various methods to prevent this redirection, including setting different browser arguments and using intercept to modify requests, but none have resolved the issue.

Steps to Reproduce:

Open the Taiko browser with the following configuration: javascript Copiar código await openBrowser({args: ['--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage'], headless: false}); Navigate to the URL using: javascript Copiar código await goto('http://aetespecial.detran.ce.gov.br/', {waitUntil: 'load'}); Additional Information:

The same URL works correctly with Puppeteer without redirection issues. I am using the latest version of Taiko. Expected Outcome:

The browser should navigate to the HTTP URL without redirecting to HTTPS.

Actual Outcome:

The browser redirects to the HTTPS version of the URL.

Request:

Could you please assist with this issue or provide guidance on how to handle HTTP URLs in Taiko without automatic redirection to HTTPS?