sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #01764
[Question #149459]: Browser Authentication Window and DEDENT error
New question #149459 on Sikuli:
https://answers.launchpad.net/sikuli/+question/149459
I am typing to open up firefox and access a web page that required me to login via windows authentication.
I can't type in the username and password when the authentication dialog come up.
I seem to have a problem making sure that the popup authentication window get focus for the type command.
Any suggestions?
[error] Stopped
[error] An error occurs at line 8
[error] Error message: SyntaxError: ("mismatched input '' expecting DEDENT", ('C:\\Users\\rwolf\\AppData\\Local\\Temp\\sikuli-tmp6848519104168900170.py', 8, 5, '\t type("domain\\\\username" + Key.TAB)\n'))
def myHandler(event):
# event: can be any variable name, it references the SikuliEvent object
print("event happened")
event.region.highlight() # highlight all changes
sleep(1)
type(PICTURE OF USER NAME CAPTION ,"a",KEY_CTRL)
#type("a", KEY_CTRL) # Select full UserName field
type("domain\\username" + Key.TAB)
#Setup the handler to deal with browser authentication window
onAppear(PICTURE OF AUTHENTICAION REQUIRED WINDOW , myHandler) # or any other onEvent()
myApp = App("Firefox")
if not myApp.window(): # no window(0) - Firefox not open
App.open("c:\\Program Files\\Mozilla Firefox\\Firefox.exe")
wait(4)
myApp.focus()
wait(5)
type("l", KEY_CTRL) # switch to address field
type("https://mysite.com"+Key.ENTER)
observe(10) #Observe to 10 sec
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.