3

I am getting the below error when I was trying to approve a document in a webpage

Mixed Content: The page at \'https://example.com\' was loaded over HTTPS, but requested an insecure resource \'http://insecure-page.com:9870/xyz\'. This request has been blocked; the content must be served over HTTPS.'

It is because my test is trying to load a non secure page over a secured page . Could someone help to bypass this error so I can continue with the rest of the steps in my automation testing script . I am using Protractor-cucumber-javascript framework

RRR
  • 75
  • 2
  • 11
  • The above solution is not working – RRR Oct 02 '18 at 09:13
  • I have tried the following `chrome_single: { browserName: 'chrome', acceptInsecureCerts : true, chromeOptions: { args: [ 'window-size=1600,1024', 'disable-infobars', 'allow-running-insecure-content', 'allow-insecure-localhost' ] }` – RRR Oct 02 '18 at 09:29
  • You need to change to `https` and use self-signed certificate, then solution from link – ponury-kostek Oct 02 '18 at 09:38
  • I can't change it because it is a link coming from another integrated system – RRR Oct 02 '18 at 10:01

1 Answers1

0

I got the same issue and I tried this approach

<iframe [src]="your-https-original-domain?URL=your-http-url" width="100%" height="600"></iframe>

Hope this would help.

Refer: https://www.brokenbrowser.com/loading-insecure-content-in-secure-pages/

jack.pop
  • 683
  • 2
  • 6
  • 21