public static void run(RecognitionEngine recogEngine, SpeechSynthesizer synthEngine, IWebDriver driver) { //synthEngine.Speak("what is your gender"); reiterateIfStaticCommand: string command = recogEngine.GetRecognizedText(synthEngine); bool WhetherStaticCommand = StaticCommands.WhetherExecuted(driver, command); if (!WhetherStaticCommand) { switch (command) { case "male": driver.FindElement(By.ClassName("Gender_iconMale_2uEOT")).Click(); WhetherSeniorCitizen.run(recogEngine, synthEngine, driver); break; case "female": driver.FindElement(By.ClassName("Gender_iconFemale_yFfRz")).Click(); WhetherSeniorCitizen.run(recogEngine, synthEngine, driver); break; default: break; } } else { goto reiterateIfStaticCommand; } }
public static void run(RecognitionEngine recogEngine, SpeechSynthesizer synthEngine, IWebDriver driver) { //synthEngine.SpeakAsync("choose from compare fixed deposit, get a rate, fixed deposit reviews" + // "hungry for more"); reiterateIfStaticCommand: string command = recogEngine.GetRecognizedText(synthEngine); bool WhetherStaticCommand = StaticCommands.WhetherExecuted(driver, command); if (!WhetherStaticCommand) { switch (command) { case "submit my fixed deposit": driver.FindElement(By.ClassName("custom-quote")).Click(); Location.run(recogEngine, synthEngine, driver); break; default: break; } } else { goto reiterateIfStaticCommand; } }
public static void run(RecognitionEngine recogEngine, SpeechSynthesizer synthEngine, IWebDriver driver) { //recogEngine.UnSetAllGrammarFiles(); //recogEngine.SetAnotherGrammarFile("CreditScore.txt"); reiterateIfStaticCommand: string command = recogEngine.GetRecognizedText(synthEngine); bool WhetherStaticCommand = StaticCommands.WhetherExecuted(driver, command); if (!WhetherStaticCommand) { Console.WriteLine(command); /* * switch (command) * { * * default: * break; * } */ } else { goto reiterateIfStaticCommand; } }
public static void run(RecognitionEngine recogEngine, SpeechSynthesizer synthEngine, IWebDriver driver) { //synthEngine.Speak("are you a senior citizen"); reiterateIfStaticCommand: string command = recogEngine.GetRecognizedText(synthEngine); bool WhetherStaticCommand = StaticCommands.WhetherExecuted(driver, command); if (!WhetherStaticCommand) { switch (command) { case "yes": driver.FindElement(By.ClassName("YesNo_iconMaleSeniorCitizenYes_1b5Xa")).Click(); FreeOffers.run(recogEngine, synthEngine, driver); break; case "no": driver.FindElement(By.ClassName("YesNo_iconMaleSeniorCitizenNo_AjA0z")).Click(); FreeOffers.run(recogEngine, synthEngine, driver); break; default: break; } } else { goto reiterateIfStaticCommand; } }
public static void run(RecognitionEngine recogEngine, SpeechSynthesizer synthEngine, IWebDriver driver) { //synthEngine.Speak("which company do you work for"); reiterateIfStaticCommand: string command = recogEngine.GetRecognizedText(synthEngine); bool WhetherStaticCommand = StaticCommands.WhetherExecuted(driver, command); if (!WhetherStaticCommand) { switch (command) { case "microsoft": driver.FindElement(By.ClassName("react-autosuggest__input")).SendKeys("microsoft"); driver.FindElement(By.ClassName("btn-large")).Click(); Salary.run(recogEngine, synthEngine, driver); break; case "google": driver.FindElement(By.ClassName("react-autosuggest__input")).SendKeys("google"); driver.FindElement(By.ClassName("btn-large")).Click(); Salary.run(recogEngine, synthEngine, driver); break; case "facebook": driver.FindElement(By.ClassName("react-autosuggest__input")).SendKeys("facebook"); driver.FindElement(By.ClassName("btn-large")).Click(); Salary.run(recogEngine, synthEngine, driver); break; case "twitter": driver.FindElement(By.ClassName("react-autosuggest__input")).SendKeys("twitter"); driver.FindElement(By.ClassName("btn-large")).Click(); Salary.run(recogEngine, synthEngine, driver); break; default: break; } } else { goto reiterateIfStaticCommand; } }
public static void run(RecognitionEngine recogEngine, SpeechSynthesizer synthEngine, IWebDriver driver) { //synthEngine.Speak("where do you live"); reiterateIfStaticCommand: string command = recogEngine.GetRecognizedText(synthEngine); bool WhetherStaticCommand = StaticCommands.WhetherExecuted(driver, command); if (!WhetherStaticCommand) { switch (command) { case "banglore": driver.FindElement(By.ClassName("ResidentCity_iconBangalore_21hQE")).Click(); CompanyName.run(recogEngine, synthEngine, driver); break; case "chennai": driver.FindElement(By.ClassName("ResidentCity_iconChennai_SfqFL")).Click(); CompanyName.run(recogEngine, synthEngine, driver); break; case "mumbai": driver.FindElement(By.ClassName("ResidentCity_iconMumbai_3i73_")).Click(); CompanyName.run(recogEngine, synthEngine, driver); break; case "new delhi": driver.FindElement(By.ClassName("ResidentCity_iconNewDelhi_2IARH")).Click(); CompanyName.run(recogEngine, synthEngine, driver); break; default: break; } } else { goto reiterateIfStaticCommand; } }
public static void run(RecognitionEngine recogEngine, SpeechSynthesizer synthEngine, IWebDriver driver) { //synthEngine.Speak("entering your details"); string command = recogEngine.GetRecognizedText(synthEngine); StaticCommands.WhetherExecuted(driver, command); if (command == "enter details") { driver.FindElement(By.CssSelector("input[name=firstName]")).SendKeys("Aditya Singh"); driver.FindElement(By.CssSelector("input[name=mobileNumber]")).SendKeys("7769987541"); driver.FindElement(By.CssSelector("input[name=email]")).SendKeys("*****@*****.**"); driver.FindElement(By.ClassName("btn-large")).Click(); } string command2 = recogEngine.GetRecognizedText(synthEngine); StaticCommands.WhetherExecuted(driver, command2); }
public static void run(RecognitionEngine recogEngine, SpeechSynthesizer synthEngine, IWebDriver driver) { reiterateIfStaticCommand: string command = recogEngine.GetRecognizedText(synthEngine); bool WhetherStaticCommand = StaticCommands.WhetherExecuted(driver, command); if (!WhetherStaticCommand) { switch (command) { default: break; } } else { goto reiterateIfStaticCommand; } }
public static void run(RecognitionEngine recogEngine, SpeechSynthesizer synthEngine, IWebDriver driver) { //synthEngine.Speak("what is you net monthly salary, enter one digit at a time"); reiterateIfStaticCommand: //synthEngine.Speak("If done speak click continue"); string command = recogEngine.GetRecognizedText(synthEngine); bool WhetherStaticCommand = StaticCommands.WhetherExecuted(driver, command); if (!WhetherStaticCommand) { switch (command) { case "number one": driver.FindElement(By.CssSelector("input[name='netMonthlyIncome']")).SendKeys("1"); goto reiterateIfStaticCommand; case "number two": driver.FindElement(By.CssSelector("input[name='netMonthlyIncome']")).SendKeys("2"); goto reiterateIfStaticCommand; case "number three": driver.FindElement(By.CssSelector("input[name='netMonthlyIncome']")).SendKeys("3"); goto reiterateIfStaticCommand; case "number four": driver.FindElement(By.CssSelector("input[name='netMonthlyIncome']")).SendKeys("4"); goto reiterateIfStaticCommand; case "number five": driver.FindElement(By.CssSelector("input[name='netMonthlyIncome']")).SendKeys("5"); goto reiterateIfStaticCommand; case "number six": driver.FindElement(By.CssSelector("input[name='netMonthlyIncome']")).SendKeys("6"); goto reiterateIfStaticCommand; case "number seven": driver.FindElement(By.CssSelector("input[name='netMonthlyIncome']")).SendKeys("7"); goto reiterateIfStaticCommand; case "number eight": driver.FindElement(By.CssSelector("input[name='netMonthlyIncome']")).SendKeys("8"); goto reiterateIfStaticCommand; case "numberoo nine": driver.FindElement(By.CssSelector("input[name='netMonthlyIncome']")).SendKeys("9"); goto reiterateIfStaticCommand; case "click continue": driver.FindElement(By.ClassName("btn-large")).Click(); Gender.run(recogEngine, synthEngine, driver); break; default: break; } } else { goto reiterateIfStaticCommand; } }