I am unable to click on the "Login" button provided in the header I am new to selenium, here is the code snippet
public class Muft_Mashwara_login {
public WebDriver driver= null;
@BeforeMethod
public void startBrowser (){
driver= new FirefoxDriver();
driver.get("http://sqa.muftmashwara.be.vteamslabs.com/home");
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
}
@Test
public void Click()throws InterruptedException
{
//Thread.sleep(3000);
driver.findElement(By.xpath(".//*[@id='header2']/nav/div/ul/li/a")).click();
WebElement loginTxt = driver.findElement(By.xpath("html/body/main/div/section/article[2]/div/div/form[1]/div[1]/div/input"));
loginTxt.sendKeys("[email protected]");
}
@AfterMethod
public void Close(){
driver.close();
}
}
it only works if I un-comment "Thread.sleep" I don't know how to implement dynamic wait in this case.