1 #include 2 #include 3 using namespace webdriverxx; 4 5 void login(string username, string password); 6 7 int main() { 8 WebDriver firefox = Start(Firefox()); 9 string username = "nn" 10 string password = "censored" 11 login(username, password); 12 return 0; 13 } 14 15 void login(string username,string password){ 16 firefox // Načtení stránky 17 .Navigate("https://www.narex.cz/login.aspx"); 18 firefox // Zapsání uživatelského jména 19 .FindElement(ByCss("input[name=Login]")) 20 .SendKeys(username); 21 firefox // Zapsání hesla 22 .FindElement(ByCss("input[id=Password]")) 23 .SendKeys(password) 24 .Submit(); 25 return; 26 } ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~