{{ message }}
feat: Support for Appium Chrome Dev Protocol Commands#1375
Merged
SrinivasanTarget merged 5 commits intoJul 23, 2020
Conversation
Contributor
There was a problem hiding this comment.
Please auto format all files, so spaces are set properly everywhere
| data.put("params",params); | ||
| } | ||
| Response response = execute(EXECUTE_CDP_COMMAND, data); | ||
| Map<String, Object> value = (Map<String, Object>) response.getValue(); |
Contributor
There was a problem hiding this comment.
there is no need in the intermediate value variable
Contributor
Author
There was a problem hiding this comment.
To avoid warning of Unchecked cast, Im continuing with the same representation but will be changing to return as Immutable map
| data.put("params",params); | ||
| }else{ | ||
| params = new HashMap<>(); | ||
| data.put("params",params); |
Contributor
There was a problem hiding this comment.
data.put("params", params == null ? Collections.emptyMap() : params)
| public class AppiumDriver<T extends WebElement> | ||
| extends DefaultGenericMobileDriver<T> implements ComparesImages, FindsByImage<T>, FindsByCustom<T>, | ||
| ExecutesDriverScript, LogsEvents, HasSettings { | ||
| ExecutesDriverScript, LogsEvents, HasSettings,ExecuteCDPCommand { |
Contributor
There was a problem hiding this comment.
This feature is currently only present in AndroidDriver
| commandRepository.put(COMPARE_IMAGES, postC("/session/:sessionId/appium/compare_images")); | ||
| commandRepository.put(EXECUTE_DRIVER_SCRIPT, postC("/session/:sessionId/appium/execute_driver")); | ||
| commandRepository.put(GET_ALLSESSION, getC("/sessions")); | ||
| commandRepository.put(EXECUTE_CDP_COMMAND, postC("/session/:sessionId/goog/cdp/execute")); |
Contributor
There was a problem hiding this comment.
the vendor name is configurable. Please rename the constant to EXECUTE_GOOGLE_CDP_COMMAND
Contributor
Author
mykola-mokhnach
approved these changes
Jul 23, 2020
SrinivasanTarget
approved these changes
Jul 23, 2020
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Change list
Client integration for Appium Chrome browser CDP Command support. Enable user to use chrome dev tool protocol commands in appium java client
new Endpoint : /session/:sessionId/goog/cdp/execute
Types of changes
What types of changes are you proposing/introducing to Java client?
Put an
xin the boxes that applyDetails
Code Sample
Example 1 : Without Parameters
driver.executeCdpCommand("Page.getCookies")
Example 2 : With Parameters
Map<String,Object> params = new HashMap();
params.put("latitude", 13.0827);
params.put("longitude",80.2707);
params.put("accuracy",1);
driver.executeCdpCommand("Emulation.setGeolocationOverride",params);