OWASP O2 Platform Blog

Login into Starbucks (via BTOpenZone) using Browser Automation (Watin)

Since I do this almost everyday, its time to automate it using an O2 Script 🙂

Here is the script that automates the Login process (populate login fields, click on checkbox and click on Submit button) to Starbucks (via UK’s BT OpenZone)

Note the use of a separate file to hold the login creadentials

var topPanel = panel.clear().add_Panel();
var ie = topPanel.add_IE_with_NavigationBar().silent(true);
Action<string,string> loginOnStarbucksViaByOpenZone =
    (username, password)=>{
var fileWithLoginDetails = @"C:\O2\_USERDATA\accounts.xml";
var credential = fileWithLoginDetails.credential("Starbucks");             
loginOnStarbucksViaByOpenZone(credential.UserName, credential.Password);
//using O2.XRules.Database.Utils.O2

here is what it looks like after login

July 20, 2011 - Posted by | IE Automation, WatiN

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: