1

I am unable to pass the basic auth stage for my automated code, the code below is an example

driver = webdriver.Chrome(ChromeDriverManager().install())
driver.implicitly_wait(10)
driver.get('https://someinfo:sensitiveinfo@gisdevtn.centr-gis(I've hidden the rest of url becuase I am not user whether I can share it)')
title = driver.title
print(title)

This code does not get me authorised. But I checked it on other basic auth sites and this method worked, so I have no idead why it does not work

I've tried using proxy, like this

import time

from seleniumwire import webdriver
from webdriver_manager.chrome import ChromeDriverManager

options = {
    'proxy': {
        'http': "https://someinfo:sensitiveinfo@gisdevtn.centr-gis.(hidden)",
        'https': "https://someinfo:sensitiveinfo@gisdevtn.centr-gis.(hidden)",
        'no_proxy': 'localhost,127.0.0.1'
    }
}

driver = webdriver.Chrome(ChromeDriverManager().install(), seleniumwire_options=options)
driver.get("https://gisdevtn.centr-gis.(hidden)")
time.sleep(3)
driver.quit()

This did not work. I've had an idea which I thought was great, to use API to authorise and then continue with my clicks and other stuff, but that did not work out, API auth was successful but it did not reflect on my running tab which required basic auth

My collegue told me that it can be done with a parser, but I can't find info regarding that. Could anybody suggest an effective and simple solution to this? Please, give me a direction to think

0 Answers0