Skip to content

Instantly share code, notes, and snippets.

@nbxx
Last active November 7, 2018 04:07
Show Gist options
  • Save nbxx/c33447cc19f858e9f35bb3b0b01a180e to your computer and use it in GitHub Desktop.
Save nbxx/c33447cc19f858e9f35bb3b0b01a180e to your computer and use it in GitHub Desktop.
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();
}
}
}
@nbxx
Copy link
Author

nbxx commented Nov 7, 2018

crazyvote1 zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment