default %Cmds.Site% https://www.facebook.com
GotoURL %Cmds.Site%

SubmitForm with
  %Form% id:login_form
  %Params:email% someone@somewhere.com
  %Params:pass% somesecurepassword
  %Submit% key:enter
end

set %Count% 1
foreach %Link% in %Response://a%
  set %URL% as selectIn %Link% @href
  set %Count% as binOp %Count% + 1
end

Notice %Count% Links auf Facebook Startseite.
GotoURL https://www.facebook.com/settings?tab=security

Notice Pruefe ob HTTPS aktiviert.
Check //span[contains(text(),'Das sichere Durchstöbern ist derzeit')]
set %alles% %Response://span[contains(text(),'Das sichere Durchstöbern ist derzeit')]%
if strMatches %alles% ^(Das sichere Durchstöbern ist derzeit).* (aktiviert)\.$
  Pass HTTPS aktiviert
else
  Notice HTTPS deaktiviert
  Notice Versuche HTTPS zu aktivieren.
  Notice Anschliessend Test neu starten.
  GotoURL https://www.facebook.com/settings?tab=security&section=browsing&view
  set %id% %Response://form[@action='/ajax/settings/security/browsing.php']/@id%
  set %fb_dtsg% %Response://form[@action='/ajax/settings/security/browsing.php']/input[@name='fb_dtsg']/@value%
  SubmitForm with
    %Form% id:%id%
    %Params:secure_browsing% 1
    %Params:fb_dtsg% %fb_dtsg%
    %Submit% value:Änderungen speichern
  end
  Notice HTTPS neu testen
  Fail HTTPS