Display results as :

Rechercher Advanced Search

Latest topics
» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

» Selenium Webdriver
Sat Feb 04, 2017 6:47 pm by


MouseHover and then click on Link

View previous topic View next topic Go down

MouseHover and then click on Link

Post by iamsethi on Sun Feb 08, 2015 5:30 pm

I am trying to write a piece of code which

1) Opens a URL
2) Mouse Hover
3) Click on a link which appears on Mouse Hover

Right now my code is completing the steps 1 and 2 but not the Step 3


package Selenium_Pack;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.Test;

public class Day5 {
    public WebDriver driver;
    public Day5()
        driver=new FirefoxDriver();
    public void Test() throws InterruptedException
        /*WebElement home = driver.findElement(By.xpath("//li//a[@href='#homeloan']"));;
        WebElement homeloan = driver.findElement(By.xpath("//div[@class='hgreenicons1']"));;*/
        WebElement e = driver.findElement(By.xpath("//a[text()='Home Loan']"));
        Actions a= new Actions(driver);
        WebElement f = driver.findElement(By.xpath("//a[@class='parent' and @href='somelink'"));;


Any suggestions will be appreciated


Posts : 3
Join date : 2015-02-08

Back to top Go down

Re: MouseHover and then click on Link

Post by ccox on Fri Feb 13, 2015 12:17 am

Are you doing this in Selenium IDE?


Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum