Posts

INSTALL IDEVICEINSTALLER ON MAC MACHINE

ideviceinstaller ideviceinstaller is a tool to interact with the installation_proxy of an iOS device allowing to install, upgrade, uninstall, archive, restore, and enumerate installed or archived apps. 1       Software Requirement 1.   Homebrew Refer the previous post for installation of homebrew http://testeverythingqtp.blogspot.in/2014/09/mobile-webapplication-automation.html 1.1   Install HomeBrew 1. Homebrew , “the missing package manager for OS X,” allows you to easily install hundreds of open-source tools. The full instructions are available on the Homebrew Wiki , but you should only need to run the command that’s listed at the bottom of the Homebrew site : $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install )" 2.        Once the installation is successful, run the following command: $ brew doctor Install ideviceinstaller Open the terminal and t...

MOBILE WEB/APPLICATION AUTOMATION INSTALLATION GUIDE FOR IOS

Image
1      Software Requirement 1.        Xcode 5.0 + (Mandatory for iOS 7) 2.        rvm 3.        Ruby 2.0.0 4.        Homebrew 5.        Java 6.        Maven 7.        Ant 8.        Cocoapods Note : In mac machine, you must have admin rights. 1.1             Install Xcode Download the latest Xcode from apple developer site https://developer.apple.com/xcode/downloads/ 1.2             Install RVM                            1. Open the terminal window on mac...

How to handle login pop up window using Selenium WebDriver?

Image
Hi All, Some times while using webdriver we have to face login popup handle.  When we passing the url using webdriver.get or webdriver.navigate.to("URL") at this time browser asks for login credentials. For handle this situation we have to do following things. 1. HTTP Basic Authentication with Selenium WebDriver the authentication prompt is not available from the Selenium WebDriver. One of the way to handle this limitation is to pass user and password in the url like like below: http://username:password@the-site.com So just to make it more clear. The username is  username  password is  password  and the rest is usual URL of your test web WebDriver driver = getDriver(); String URL = "http://" + username + ":" + password + "@" + "link"; driver.get(URL); but sometimes it does not work for IE browser  we can use robot  method import java.awt.Robot; import java.awt.Toolkit; import java.a...

Create issue in JIRA using Http Client via REST API services/ from JAVA

Image
JIRA  is a well known Software-suite. In short, JIRA is a proprietary issue tracking product, maintained and developed by Atlassian. It is commonly used for bug tracking, issue tracking, and project management The JIRA Remote API Calls I was surprised how easy it was to get the Remote API up and running. Basically you just enable the ‘Accept remote API calls’ option in your General Configuration settings under the Administration tab. The moment you turn it on, the following URL should give you a nice response Note: It supports only in JIRA >5.0. Here in am using http client 4.1.2 Here is  the code: import java.io.IOException; import org.apache.http.HttpEntity; import org.apache.http.HttpHost; import org.apache.http.HttpResponse; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.AuthCache; import org.apache.http.client.ClientProtocolException; import org.apache.http...

Jmeter bean shell script, create file, read jmeter variable value, store script variable value into jmeter variable

Image
Hi All, Some times in JMeter scripting we need to store the output value in file or wanna show the run time  variable value in console window. OR we need to get the current JMeter script directory path. This can be achieved via scripting in Bean Shell Pre/Post Processor. Here I am using time and counter function of JMeter to create the file.In bean shell scripting we are reading the JMeter variables value and storing script variable value into JMeter variable or creating Jmeter variable Here is the  Bean Shell script : import org.apache.jmeter.services.FileServer; import org.apache.jmeter.services.FileServer; import java.util.Date; import java.text.SimpleDateFormat; SimpleDateFormat formatter = new SimpleDateFormat( "yyyyMMddHHmmss" ); String datetime = formatter.format( new java.util.Date() ); // Get current running counter value(C refrence name deifned in counter config element) String counter= vars.get("C"); // Get Jmeter variable value in bean she...

Perform Mouse, drag-and-drop, sliding, selecting multiple Action in Webdriver/Selenium 2

Perform Mouse, drag-and-drop, sliding, selecting multiple Actions in Web driver/Selenium 2  Solution The example code below shows some examples where we can use the Actions interface of Selenium WebDriver. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 package selenium2.examples; import java.util.List ; import org.openqa.selenium.By ; import org.openqa.selenium.Keys ; import org.openqa.selenium.WebDriver ; import org.openqa.selenium.WebElement ; import org.openqa.selenium.firefox.FirefoxDriver ; import org.openqa.selenium.interactions.Action ; import org.openqa.selenium.interactions.Actions ; import org.testng.annotations.AfterClass ; import org.testng.annotations.BeforeClass ; import org.testng.annotations.Test ; public class ActionExample { private static WebDriver driver ; ...

Count elements/links on page using webdriver

Sometimes we need to count links on page. Here we are counting the elements on page. We use the same method for any type of element like link, span,button just use html tag of that element in xpath. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// import java.net.URL; import java.util.List; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By ; import org.openqa.selenium.WebDriver; import org.openqa.selenium. WebElement; import org.openqa.selenium.chrome. ChromeDriver; import org.openqa.selenium.firefox. FirefoxDriver; import org.openqa.selenium.firefox. FirefoxProfile;