初始化提交
This commit is contained in:
35
WebDriverAgentRunner/Info.plist
Normal file
35
WebDriverAgentRunner/Info.plist
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSLocationAlwaysUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
58
WebDriverAgentRunner/UITestingUITests.m
Normal file
58
WebDriverAgentRunner/UITestingUITests.m
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import <WebDriverAgentLib/FBDebugLogDelegateDecorator.h>
|
||||
#import <WebDriverAgentLib/FBConfiguration.h>
|
||||
#import <WebDriverAgentLib/FBFailureProofTestCase.h>
|
||||
#import <WebDriverAgentLib/FBWebServer.h>
|
||||
#import <WebDriverAgentLib/XCTestCase.h>
|
||||
|
||||
@interface UITestingUITests : FBFailureProofTestCase <FBWebServerDelegate>
|
||||
@end
|
||||
|
||||
@implementation UITestingUITests
|
||||
|
||||
+ (void)setUp
|
||||
{
|
||||
[FBDebugLogDelegateDecorator decorateXCTestLogger];
|
||||
[FBConfiguration disableRemoteQueryEvaluation];
|
||||
[FBConfiguration configureDefaultKeyboardPreferences];
|
||||
[FBConfiguration disableApplicationUIInterruptionsHandling];
|
||||
if (NSProcessInfo.processInfo.environment[@"ENABLE_AUTOMATIC_SCREEN_RECORDINGS"]) {
|
||||
[FBConfiguration enableScreenRecordings];
|
||||
} else {
|
||||
[FBConfiguration disableScreenRecordings];
|
||||
}
|
||||
if (NSProcessInfo.processInfo.environment[@"ENABLE_AUTOMATIC_SCREENSHOTS"]) {
|
||||
[FBConfiguration enableScreenshots];
|
||||
} else {
|
||||
[FBConfiguration disableScreenshots];
|
||||
}
|
||||
[super setUp];
|
||||
}
|
||||
|
||||
/**
|
||||
Never ending test used to start WebDriverAgent
|
||||
*/
|
||||
- (void)testRunner
|
||||
{
|
||||
FBWebServer *webServer = [[FBWebServer alloc] init];
|
||||
webServer.delegate = self;
|
||||
[webServer startServing];
|
||||
}
|
||||
|
||||
#pragma mark - FBWebServerDelegate
|
||||
|
||||
- (void)webServerDidRequestShutdown:(FBWebServer *)webServer
|
||||
{
|
||||
[webServer stopServing];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user