I was creating a sample test using site
www.flipkart.com, where one of the scenario actually gets failed. kindly help me to understand is there anything wrong with the code or something which i'm missing.
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
public class Login {
public static void main(String[] args) throws InterruptedException {
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10L, TimeUnit.SECONDS);
Actions action = new Actions(driver);
action.moveToElement(driver.findElement(By.xpath("//ul[@class='menu-links']/li[2]"))).perform();
driver.findElement(By.xpath("//a[contains(@href,'hp_nmenu_sub_men_1_Watches')]")).click();
action = null;
driver.close();
driver.quit();
}
}
Rahul...