Selenium 自动化axis银行网站

Selenium 自动化axis银行网站,selenium,selenium-webdriver,automation,testng,Selenium,Selenium Webdriver,Automation,Testng,我正在尝试使用操作选择产品标题下的帐户。虽然这本应该很容易做到,但我却无法做到。谁能帮忙吗 [Account under Product heading][1] driver.get("http://www.axisbank.com/"); Thread.sleep(2000); Actions action=new Actions(driver); WebElement account=driver.findElement(By.xpath("//*[@

我正在尝试使用操作选择产品标题下的帐户。虽然这本应该很容易做到,但我却无法做到。谁能帮忙吗

    [Account under Product heading][1]
    driver.get("http://www.axisbank.com/");
    Thread.sleep(2000);
    Actions action=new Actions(driver);
    WebElement account=driver.findElement(By.xpath("//*[@id='product-menu']/div[2]/div/div/ul[1]/li[1]/a"));
    WebElement prod=driver.findElement(By.xpath("html/body/form/div[5]/div[1]/div[3]/div/div[1]/div[2]/div/div/ul[1]/li[1]/a"));
    action.moveToElement(prod).build().perform();
    Thread.sleep(2000);
    action.moveToElement(account).click().perform();

此工作示例在菜单中选择产品,然后选择帐户:

WebDriver driver = new FirefoxDriver();
driver.get("http://www.axisbank.com/");

// move the cursor to the menu Product
WebElement element = driver.findElement(By.cssSelector("#product span"));
new Actions(driver).moveToElement(element).perform();

// click on accounts
driver.findElement(By.cssSelector(".main-menu a[title=Accounts]")).click();

实际问题/错误是什么?您应该指出失败消息。请包括您收到的错误/失败消息。这将帮助我们诊断问题。我没有收到任何错误消息。报告显示测试已通过并单击了帐户。但这并不是真的,我只是想要这一系列的步骤:1。打开axis银行网站。2.打开产品下拉列表3。在T4中打开帐户。点击储蓄账户5。打开下一页6的“往来账户”部分。从列出的选项中选择任意选项。有人能帮忙吗?