How to open a site using Terminal(Mac) in which username and password is required?
I am using open command in my Mac terminal to launch a website through default b开发者_如何学运维rowser which is Mozilla firefox , but that site after opening immediately requires username and password and I don't know how to give it . Kindly help me in this issue
firefox http://username:password@somesite.com
Note that this will make your username and password public to anyone who runs ps aux
on your system (nb, is it ps -ef on osX?)
Maybe Selenium might be of any interest to you, too. You can create scripts and it will follow your scripts in the browser.
E.g. login, click.... There is a firefox plugin, which lets you record a 'macro'. Later on you can replay it.
Search on stackoverflow for more infos on selenium or check out the firefox plugin:
http://seleniumhq.org/projects/ide/
Greetings,
Jan
You're probably going to get better resulting using Apple Script to control the Firefox application.
精彩评论