Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void AcceptTos()
- {
- /*
- FirefoxOptions options = new FirefoxOptions();
- options.AddArgument("-headless");
- var driverService = FirefoxDriverService.CreateDefaultService();
- driverService.HideCommandPromptWindow = true;
- */
- IWebDriver web = new FirefoxDriver();
- web.Navigate().GoToUrl("https://wykop.pl");
- WebDriverWait wait = new WebDriverWait(web, TimeSpan.FromSeconds(10));
- wait.Until(ExpectedConditions.ElementToBeClickable(By.ClassName("MuiGrid-root")));
- IWebElement element = web.FindElement(By.ClassName("MuiGrid-root"));
- Actions actions = new Actions(web);
- actions.MoveToElement(element).Click().Perform();
- }
Add Comment
Please, Sign In to add comment