Python Windows Authentication username and password is not working

后端 未结 2 1545
生来不讨喜
生来不讨喜 2020-11-22 08:58

I am trying to enter data in prompt (URL Given), below codes is giving me an error. Please help me out with these?

from selenium import webdriver
from seleni         


        
2条回答
  •  再見小時候
    2020-11-22 09:19

        def test_1_authentication(self):
            self.driver.get("https://the-internet.herokuapp.com/basic_auth")
            shell = win32com.client.Dispatch("WScript.Shell")
            shell.Sendkeys("admin")
            time.sleep(3)
            shell.Sendkeys("{TAB}")
            time.sleep(3)
            shell.Sendkeys("admin")
            time.sleep(3)
            shell.Sendkeys("{ENTER}")
            time.sleep(3)
    

    Above code is also properly worked :)

提交回复
热议问题