This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.testingalert; | |
import com.Input.InputLogin; | |
import com.jayway.restassured.RestAssured; | |
import com.jayway.restassured.response.Response; | |
import java.util.Map; | |
import java.util.concurrent.TimeUnit; | |
public class LoginRest | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.jayway.restassured.RestAssured.given; | |
import org.junit.Test; | |
public class HelloWorldRestAssured | |
{ | |
@Test | |
public void makeSureThatGoogleIsUp() | |
{ | |
given().when().get("http://www.google.com").then().statusCode(200); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void clickCamera() | |
{ | |
Keywords.keyBoardEvent(27); | |
System.out.print("Clicked on Camera "); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void keyBoardEvent(int eventNumber) | |
{ | |
try | |
{ | |
Runtime.getRuntime().exec("cmd /C adb shell input keyevent " + eventNumber); | |
Thread.sleep(3000); | |
} | |
catch (Throwable t) | |
{ | |
t.printStackTrace(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.ttn</groupId> | |
<artifactId>testdest</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>testdest</name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
public class AppiumProg { | |
public static void main(String[] args) { | |
try | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File app = new File(appDir, “Teamchat.apk”); | |
DesiredCapabilities cap=new DesiredCapabilities(); | |
cap.setCapability(“BROWSER_NAME”, “”); | |
cap.setCapability(“VERSION”, “4.4.4”); | |
cap.setCapability(“devicename”, “ANDROID”); | |
cap.setCapability(“platformName”, “ANDROID”); | |
cap.setCapability(“appPackage”, “com.teamchat”); | |
cap.setCapability(“appActivity”, “com.teamchat.SplashActivity”); | |
cap.setCapability(“app”, “Teamchat.apk”); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ttn.ResponseJSON; | |
import com.ttn.Model.Login; | |
import com.ttn.outputInterface.OutputInterface; | |
public class Login_Response implements OutputInterface | |
{ | |
public Object response(Object object) | |
{ | |
String Message,UserName,CityAddressInfo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Object GSON(String Input,Class modelClass) | |
{ | |
Gson gson = new GsonBuilder().setPrettyPrinting().create(); | |
Object object = gson.fromJson(Input, modelClass); | |
return object; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String apiMethod_GET() | |
{ | |
String foutput = ""; | |
try | |
{ | |
URL url = new URL(uri); | |
System.out.println("API URL : " + url); | |
HttpURLConnection conn = (HttpURLConnection) url.openConnection(); | |
conn.setDoOutput(true); |