program YahooMail; var sNewbieFunction : string; procedure OnDocumentComplete(URL : string); begin sNewbieFunction := GetSelectedFunction; if URL = 'http://mail.yahoo.com/?.intl=us' then begin Fill('login', GetParam('yahooL')); // Define yahooL in Parameters Fill('passwd', GetParam('yahooP')); // Define yahooP in Parameters ClickButtonValue('Sign In'); end; if IsPartOf('mail.yahoo.com/ym/login?', URL) then begin if (sNewbieFunction = 'ViewInbox') then ClickHyperLink('Inbox'); if (sNewbieFunction = 'SentMail') then ClickHyperLink('Sent'); end; WriteLn(URL); end; begin Navigate('http://mail.yahoo.com/?.intl=us'); NewbieFunction('1. View Inbox', 'ViewInbox'); NewbieFunction('2. View Sent Mail', 'SentMail'); end.