Saturday, September 24, 2016
Extracting Tooltip text using Selenium WebDriver : Quick Codes
Tooltip displayed for an element is identifed based on the attribute title defined for the element. Knowing that title of the element is the tooltip resolves half of the problem.
Suppose there is an element with id as abcde, the tooltip of the element can be stored in a string using code as below:
//example 1: getting tooltip of the elemet String strToolTipText = driver.findElement(By.xpath("//input[@id='abcde']").getAttribute("title"); //example 2 : Validating tooltip is displayed correctly for an webElement
public boolean verifyTooltipText(WebElement webElem, String expToolTiptext) { String acttooltiptext = webElem.getAttribute("title"); if(acttooltiptext.contentEquals(exptooltiptext)) { return true } else { return false } }
Saturday, September 3, 2016
Jenkins setup on localhost server
- Downloading Jenkins
- Download Jenkins from Jenkins official site.
- Jenkins.war will be downloaded.
- Go to command prompt and navigate to folder in which Jenkins is downloaded
- Run below command in command prompt
- java -jar jenkins.war
- Navigate to localhost:8080 on the machine where jenkins is run. The page asks to provide the admin password and the location from where to copy the password.
- Provide the Password
- Select the suggested plugins to install
- Download Jenkins from Jenkins official site.
- Jenkins.war will be downloaded.
- Now we can use Jenkins
- Jenkins set up is complete. Click on start using Jenkins for creating jobs.
- Jenkins dashboard will be displayed
- Jenkins dashboard will be displayed
Subscribe to:
Posts (Atom)