Clicking on button on top right corner to open frame does not work | Selenium C# Forum
M
mai Posted on 01/01/2019
Hi

This code was working . For some reason it is not working any more. I am trying to open login window to work with frames.
The console shows text "done" but the "login/sign in " button is not clicked. I've tried adding sleep but then I get stale element error

static void Main(string[] args)
{
       IWebDriver driver = null;
 
       ChromeOptions options = new ChromeOptions();
       driver = new ChromeDriver(@"C:\selenium\latestDriver", options);
       driver.Url = "https://paytmmall.com/";
 
       driver.Manage().Window.Maximize();
       driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20);
 
       driver.FindElement(By.XPath("//*[@id='app']/div/div[2]/div[2]/div[2]/div[3]/div[3]/div")).Click();
 
   
       Console.WriteLine("done");
}

G
gunjan Replied on 02/01/2019

Hi Mai,
This code is clicking on the login button and running fine. I can't see any error.


M
mai Replied on 03/01/2019

Hi Gunjan
I added thread.sleep and it worked. Thanks for your help