Download How To Capture And Verify Tool tip Text In Selenium WebDriver Example - Software Testing Tutorials graphic type that can be scaled to use with the Silhouette Cameo or Cricut. An SVG's size can be increased or decreased without a loss of quality. All of our downloads include an image, Silhouette file, and SVG file. It should be everything you need for your next project. Our SVG files can be used on adhesive vinyl, heat transfer and t-shirt vinyl, or any other cutting surface
// Get tooltip text from link.
String tooltiptext1 = driver.findElement(By.xpath("//a[contains(.,'Hover over me')]")).getAttribute("title");
package STTA.MavenProject1;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
public class GetTooltip {
WebDriver driver;
@BeforeTest
public void setup() throws Exception {
driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.get("http://only-testing-blog.blogspot.in/2015/03/chart.html");
}
@Test
public void clickBeforeLoad() {
// Get tooltip text from link.
String tooltiptext1 = driver.findElement(By.xpath("//a[contains(.,'Hover over me')]")).getAttribute("title");
System.out.println("Tootltip text on link Is : " + tooltiptext1);
//Verify tooltip text of link.
Assert.assertEquals(tooltiptext1, "tooltip text!");
// Get tooltip text from textbox.
String tooltiptext2 = driver.findElement(By.xpath("//input[@id='tooltip-1']")).getAttribute("title");
System.out.println("Tootltip text on textbox Is : " + tooltiptext2);
//Verify tooltip text of text box.
Assert.assertEquals(tooltiptext2, "Enter You name");
}
}
Download How To Capture And Verify Tool tip Text In Selenium WebDriver Example - Software Testing Tutorials All SVG file downloads also come bundled with DXF, PNG, and EPS file formats. All designs come with a small business commercial license. These SVG cut files are great for use with Silhouette Cameo or Cricut and other Machine Tools.