• Post Reply Bookmark Topic Watch Topic
  • New Topic

Selenium Code for Canvas tag  RSS feed

 
tk bharathi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URL: https://www.redbus.in/search?fromCityName=Chennai&fromCityId=123&toCityName=Bangalore&toCityId=122&onward=29-Aug-2017&opId=0&busType=Any

<canvas data-type="lower" width="489" height="211" class="pointer"></canvas>

tried with the below code and did not get tooltip from seat 1. Could you please help.

public  static void tooltip() throws IOException, InterruptedException
{


Actions ToolTip1 = new Actions(driver);
    WebElement element = driver.findElement(By.xpath("//*[@id='buses_viewonward']/div/ul/li[2]/div[2]/div[1]/div[1]/div/div/div/div[3]/div[1]"));
    Thread.sleep(2000);
    ToolTip1.moveToElement(element).moveByOffset(489,211).click().perform();
    String ToolTipText = element.getText();
    System.out.println("Tooltip value is: " + ToolTipText);

}
seat-picture.png
[Thumbnail for seat-picture.png]
 
tk bharathi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help on this.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Patience is a virtue.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!