-1

I am using this code to click on on a button

driver.findElement(By.linkText("Sign up")).click();

I tried using:

new WebDriverWait(driver,30).until(ExpectedConditions.elementToBeClickable(By.linkText("Sign up"))) 

but it did not work.

  • send me the URL – iamsankalp89 Aug 25 '17 at 13:26
  • Possible duplicate of [Selenium webdriver Java code using web driver for double click a record in a grid](https://stackoverflow.com/questions/21907007/selenium-webdriver-java-code-using-web-driver-for-double-click-a-record-in-a-gri) – JeffC Aug 25 '17 at 15:35
  • Where is your code that attempts the double click? You only have a wait for an element to be clickable but never click it. – JeffC Aug 25 '17 at 15:36

1 Answers1

0

Try this sample as you does not mention URL:

WebDriver driver =new FirefoxDriver();     
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("http://only-testing-blog.blogspot.in/2014/09/selectable.html");
WebElement ele = driver.findElement(By.xpath("//button[contains(.,'Double-Click Me To See Alert')]"));

//To generate double click action on "Double-Click Me To See Alert" button.
Actions action = new Actions(driver);
action.doubleClick(ele);
action.perform();

Go through this URL to learn more:

http://www.software-testing-tutorials-automation.com/2015/01/double-click-on-button-using-actions.html

iamsankalp89
  • 4,607
  • 2
  • 15
  • 36