Created
April 12, 2020 12:55
-
-
Save vivrichards600/14e0684dfa666b03eb415f65d6479b18 to your computer and use it in GitHub Desktop.
Automating color sense 2 test on http://zzzscore.com/color2/en/ using webdriver and c#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IWebDriver driver = new FirefoxDriver(); | |
driver.Navigate().GoToUrl("http://zzzscore.com/color2/en/"); | |
var sixtySecondsFromNow = DateTime.Now.AddSeconds(60); | |
while (DateTime.Now <= sixtySecondsFromNow) | |
{ | |
driver.FindElement(By.CssSelector(".main")).Click(); | |
} | |
Console.WriteLine($"Score: {driver.FindElement(By.Id("score"))}"); | |
driver.Quit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment