Re: Script help for filling in Chrome credentials dialog
Re: Script help for filling in Chrome credentials dialog
- Subject: Re: Script help for filling in Chrome credentials dialog
- From: "Ball, Dan" <email@hidden>
- Date: Mon, 20 Feb 2017 21:02:43 +0000
- Thread-topic: Script help for filling in Chrome credentials dialog
>On 2/17/17, 7:29 PM,
>
>Can someone help with this? Trying to launch a webpage in kiosk mode using Chrome that needs authentication and trying to script it, but it won’t fill in the credentials when the dialog >pops up in Chrome.
>
> delay 4
> tell application "Finder"
> activate
> do shell script "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --kiosk https://somewebpage.com<https://somewebpage.com/>"
> end tell
> tell application "Google Chrome" (Also tried here System Events, Google Chrome Helper or System Events to tell process “Google Chrome”)
> activate
> delay 0.3
> keystroke "username"
> keystroke tab
> keystroke "password"
> keystroke return
> end tell
>
>
> Thanks,
>
> Dan
In case anyone is curious…….I believe this is my final script. Thanks for the tips David Gregg!
Not much to it, but getting things in order for certain things to work seemed to be key.
Thanks,
Dan
-- Code Start
delay 8
set urlOfSite to "thewebsite"
set userName to "username"
set userPsswd to "password"
tell application "Google Chrome"
activate
close every window
delay 2
open location urlOfSite
end tell
delay 3
tell application "System Events"
tell process "Google Chrome"
set frontmost to true
tell group 1 of window 1
delay 1
set value of text field 2 to userName
delay 1
set value of text field 1 to userPsswd
delay 1
keystroke return
delay 1
keystroke "f" using {command down, control down}
end tell
end tell
end tell
-- Code End
This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, notify the sender immediately by return email and delete the message and any attachments from your system.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden