?????????? Facebook ????? WDA ????????????? FBScreenshotCommands.m ???:
????#import "FBScreenshotCommands.h"
????#import "XCUIDevice+FBHelpers.h"
????@implementation FBScreenshotCommands
????#pragma mark - <FBCommandHandler>
????+ (NSArray *)routes
????{
????return
????@[
????[[FBRoute GET:@"/screenshot"].withoutSession respondWithTarget:self action:@selector(handleGetScreenshot:)]??
????[[FBRoute GET:@"/screenshot"] respondWithTarget:self action:@selector(handleGetScreenshot:)]??
????];
????}
????#pragma mark - Commands
????+ (id<FBResponsePayload>)handleGetScreenshot:(FBRouteRequest *)request
????{
????NSString *screenshot = [[XCUIDevice sharedDevice].fb_screenshot base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
????return FBResponseWithObject(screenshot);
????}
????@end
??????????????????? /screenshot ??·?????????????????? handleGetScreenshot?????????????? XCUIDevice ??????????
?????????????????WDA ????·????????????????????????? BundleID ??????????????????????????????????????????????????????????? URL ??????????? URL????????????飬?????????? URL ?????ж???????????????????????????
????Appium ?????
???????????Appium ?????????? Node.js ????????????????????????? WDA ??????????????????????????? URL ?? /screenshot????????????б??????????????????? WDA ?б???? Appium ??????????????Э?顣????? Appium ????? Android ?????????????????????????????????? Appium ???????н????????????????????????Э????÷???????
????Appium ??????? WebDriver Э?顣?? w3.org ??????????Э?????????????? Selenim ????? ??????? WebDriver Э?顣?????в??????????????????????????? or ????淶????????????????????λ??????:
????WebDriver’s goal is to supply a well-designed object-oriented API that provides improved support for modern advanced web-app testing problems.
???????????? WebDriver ??????????????Э?鼴?ɡ?
????Appium ?????
????Appium ????????????д????Щ??????????Appium ?????????????????????????WebDriver Э???????????????????????????????????????????????????? WebDriver ?淶?? URL?????? https://www.w3.org/TR/webdriver/#list-of-endpoints ?漲???????????????????????????????? URL ?????
????????????????? Java ????????д?????????????????? Android ?????????е?????????д Android??iOS ???????2??????????????
???????
??????? Appium ?????????????仰?????:
??????????????????????????????????? WebDriver Э???μ? URL????? Node ???????????????????????????????????й????в?????? URL?????? WebDriver Э??????????е?????????????????????????????????????????????????? Node ????????
???????????????????:
????iOS ?????????????????????????????????????????????Σ???????????