This file contains 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
895 ms.POST /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element | |
1184 ms.GET /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element/4/attribute/name | |
1061 ms.POST /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element | |
1067 ms.GET /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element/5/attribute/name | |
1068 ms.POST /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element | |
1074 ms.GET /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element/6/attribute/name | |
1064 ms.POST /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element | |
1078 ms.GET /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element/7/attribute/name | |
1061 ms.POST /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element | |
1082 ms.GET /session/5f0e93ab-fae3-442d-af35-ad45398d41f6/element/8/attribute/name |
This file contains 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
IOSCapabilities safari = IOSCapabilities.ipad("Safari"); | |
safari.setCapability(IOSCapabilities.TIME_HACK, false); | |
driver = new RemoteUIADriver(url, safari); | |
Criteria urlAddressBar = | |
new AndCriteria(new TypeCriteria(UIAElement.class), new ValueCriteria("Go to this address")); | |
// using native selector and event. |
This file contains 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 RemoteObject findElementById(RemoteObject element,String id) throws Exception { | |
JSONObject cmd = new JSONObject(); | |
cmd.put("method", "Runtime.callFunctionOn"); | |
JSONArray args = new JSONArray(); | |
args.put(new JSONObject().put("value", id)); | |
if (element == null){ | |
Node document = cache.getCurrentDocument(); |
This file contains 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
{ | |
"id": 7, | |
"result": { | |
"result": { | |
"className": "HTMLFormElement", | |
"description": "HTMLFormElement", | |
"objectId": "{\"injectedScriptId\":149,\"id\":2}", | |
"subtype": "node", | |
"type": "object" | |
}, |
This file contains 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
{ | |
"id": 3, | |
"result": { | |
"result": { | |
"subtype": "null", | |
"type": "object", | |
"value": null | |
}, | |
"wasThrown": false | |
} |
This file contains 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 main(String[] args) throws Exception { | |
WebInspector inspector = new WebInspector(); | |
String ref = inspector.findSearchButton(); | |
inspector.callFunctionOn(ref); | |
} | |
This file contains 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 main(String[] args) throws IOException, InterruptedException, JSONException { | |
WebInspector inspector = new WebInspector(); | |
JSONObject cmd = new JSONObject(); | |
cmd.put("id", 1); | |
cmd.put("method", "Runtime.evaluate"); | |
cmd.put( | |
"params", | |
new JSONObject().put("expression", "alert2('test');") | |
.put("objectGroup", "console") |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>__argument</key> | |
<dict> | |
<key>WIRApplicationIdentifierKey</key> | |
<string>com.apple.mobilesafari</string> | |
<key>WIRConnectionIdentifierKey</key> | |
<string>95DF95FF-C8AF-4CF2-94E3-E940A7F03DA9</string> |
This file contains 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
@DataProvider(name = "ipad") | |
public Object[][] getLanguages() { | |
return new Object[][] { {"en"}, {"fr"}, {"de"}}; | |
} | |
@Test(dataProvider = "ipad") | |
public void testIOSAppIPAD(String language) { | |
IOSCapabilities cap = IOSCapabilities.ipad("eBay"); | |
cap.setLanguage(language); | |
This file contains 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 enum WebDriverLikeCommand { | |
NEW_SESSION("POST","/session",String.class), | |
GET_SESSION("GET", "/session/:sessionId",JSONObject.class), | |
DELETE_SESSION("DELETE","/session/:sessionId",null), | |
SESSIONS("GET","/sessions",JSONArray.class), | |
SCREENSHOT("GET","/session/:sessionId/screenshot",Void.class), | |
ELEMENT("POST" , "/session/:sessionId/element/:id/element",UIAElement.class), |