jeudi 9 juillet 2020

Python. Selenium. test failed after sending request(400 code)

I write ui-tests on python, use selenium. When I run the test, have following problem: after clicking on button what sends https-request I received 400 code. When I check this problem in browser, without test environment, all is good, I can't reproduce it.What could it be? Can be problem with chromedriver configuration? chromedriver configuration

chrome_options = webdriver.ChromeOptions()
        chrome_options.add_argument("--disable-dev-shm-usage")
        chrome_options.add_argument("--disable-gpu")
        chrome_options.add_argument("--start-maximized")
        chrome_options.add_argument('--disable-extensions-http-throttling')
        capabilities = webdriver.DesiredCapabilities.CHROME.copy()
        capabilities['acceptSslCerts'] = True
        capabilities['acceptInsecureCerts'] = True
        return webdriver.Chrome(executable_path= ChromeDriverManager().install(), chrome_options=chrome_options,
                                desired_capabilities=capabilities) 

This response received:enter image description here

Aucun commentaire:

Enregistrer un commentaire