Last active
November 7, 2018 04:07
-
-
Save nbxx/c33447cc19f858e9f35bb3b0b01a180e to your computer and use it in GitHub Desktop.
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
using System; | |
using System.Threading; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Chrome; | |
namespace CrazyVote1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int i = 0; | |
do | |
{ | |
i++; | |
IWebDriver browser = new ChromeDriver(); | |
browser.Manage().Window.Minimize(); | |
browser.Navigate().GoToUrl("https://www.10best.com/awards/travel/best-gift-for-business-travelers-2018/asobu-coldbrew-insulated-portable-brewer/"); | |
browser.Manage().Window.Minimize(); | |
IWebElement voteButton = browser.FindElement(By.Id("awardVoteButton")); | |
voteButton.Click(); | |
browser.Close(); | |
Console.WriteLine("vote times: " + i.ToString()); | |
Thread.Sleep(3000); | |
} while (true); | |
Console.WriteLine("done."); | |
Console.ReadLine(); | |
} | |
} | |
} |
Author
nbxx
commented
Nov 7, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment