Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using OpenQA.Selenium;
  7. using OpenQA.Selenium.Chrome;
  8. using OpenQA.Selenium.Support;
  9. using OpenQA.Selenium.Support.UI;
  10. using OpenQA.Selenium.Interactions;
  11.  
  12.  
  13. namespace FunCaptcha
  14. {
  15. class Program
  16. {
  17. static void Main(string[] args)
  18. {
  19. ChromeOptions options = new ChromeOptions();
  20. options.AddArgument("--user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 10_1_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Mobile/14B150");
  21. options.AddArgument("--window-size=750,1334");
  22.  
  23. ChromeDriver driver = new ChromeDriver(options);
  24.  
  25. driver.Navigate().GoToUrl(AppDomain.CurrentDomain.BaseDirectory + @"fun_loader.html");
  26.  
  27. System.Threading.Thread.Sleep(5500);
  28.  
  29. OpenQA.Selenium.Interactions.Internal.ICoordinates coordinates;
  30. OpenQA.Selenium.IWebElement element;
  31.  
  32.  
  33. Actions action = new Actions(driver);
  34.  
  35. element = driver.FindElement(By.Id("FunCAPTCHA"));
  36.  
  37. action.MoveToElement(element, 100, 100).Click().Build().Perform();
  38.  
  39.  
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement