Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Updated the css selector
Browse files Browse the repository at this point in the history
  • Loading branch information
walidpyh committed Mar 31, 2022
1 parent 6af8567 commit d7a3f46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DiscordQR/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ public void SeleniumHandler()
driver.Navigate().GoToUrl("https://discord.com/login");

WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
wait.Until(webDriver => webDriver.FindElement(By.ClassName("qrCode-wG6ZgU")));
wait.Until(webDriver => webDriver.FindElement(By.ClassName("qrCode-2R7t9S")));

IWebElement firstResult = driver.FindElement(By.ClassName("qrCode-wG6ZgU"));
IWebElement firstResult = driver.FindElement(By.ClassName("qrCode-2R7t9S"));

Thread.Sleep(3000);
firstResult = driver.FindElement(By.CssSelector(".qrCode-wG6ZgU > img:nth-child(2)"));
firstResult = driver.FindElement(By.CssSelector(".qrCode-2R7t9S > img:nth-child(2)"));
log("Waiting for webpage...");
//Generating QR
string QRbase64 = firstResult.GetAttribute("src");
Expand Down

0 comments on commit d7a3f46

Please sign in to comment.