Posts

Showing posts with the label JAVA

Scrolling web page with Webdriver using java

We can scroll the web page using javaScript Executor or You can use the "org.openqa.selenium.interactions.Actions" class to move to an element: Following classes you required in you java code import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; 1. We may require to scroll to bottom of the page and then perform operations. For this scenario we can use following code ((JavascriptExecutor) driver).executeScript( "window.scrollTo(0, document.body.scrollHeight)" ); 2. Some times, we may require to scroll to particular element and peform operations on that particular element. For this we need to pass the element on which we need to perform operation. For this scenario we ca use following code WebElement element = driver.findElement(By.linkText( "googleMap" )); ((JavascriptExecutor) driver).executeScrip...

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...

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...