appium-webdriveragent 3.13.2 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Scripts/build.sh +13 -16
- package/WebDriverAgent.xcodeproj/project.pbxproj +2 -2
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazuaki.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazuaki.xcuserdatad/WorkspaceSettings.xcsettings +20 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/kazuaki.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +2322 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/{elf.xcuserdatad → kazuaki.xcuserdatad}/xcschemes/xcschememanagement.plist +35 -12
- package/WebDriverAgentLib/.DS_Store +0 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +1 -4
- package/WebDriverAgentLib/Categories/XCUIElement+FBWebDriverAttributes.m +10 -1
- package/WebDriverAgentLib/Commands/FBCustomCommands.m +10 -2
- package/WebDriverAgentLib/Routing/FBElement.h +2 -2
- package/WebDriverAgentLib/Routing/FBResponsePayload.m +1 -1
- package/WebDriverAgentLib/Utilities/FBMathUtils.h +0 -3
- package/WebDriverAgentLib/Utilities/FBMathUtils.m +0 -13
- package/WebDriverAgentLib/Vendor/CocoaAsyncSocket/GCDAsyncSocket.h +0 -6
- package/WebDriverAgentLib/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m +0 -15
- package/WebDriverAgentLib/Vendor/CocoaHTTPServer/HTTPServer.h +3 -77
- package/WebDriverAgentLib/Vendor/CocoaHTTPServer/HTTPServer.m +0 -348
- package/WebDriverAgentRunner-Runner.app.zip +0 -0
- package/WebDriverAgentTests/IntegrationTests/FBSafariAlertTests.m +13 -10
- package/build/index.js +6 -4
- package/build/lib/check-dependencies.js +1 -1
- package/build/lib/constants.js +1 -1
- package/build/lib/utils.js +11 -11
- package/build/lib/webdriveragent.js +2 -2
- package/build/lib/xcodebuild.js +1 -1
- package/lib/utils.js +2 -1
- package/package.json +1 -1
- package/PrivateHeaders/.DS_Store +0 -0
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/elf.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/elf.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -75
- package/WebDriverAgentLib/Utilities/LRUCache/.DS_Store +0 -0
- package/WebDriverAgentLib/Vendor/.DS_Store +0 -0
- package/WebDriverAgentRunner/.DS_Store +0 -0
- package/WebDriverAgentTests/IntegrationApp/Resources/.DS_Store +0 -0
|
@@ -17,16 +17,6 @@
|
|
|
17
17
|
// Other flags: trace
|
|
18
18
|
static const int httpLogLevel = HTTP_LOG_LEVEL_INFO; // | HTTP_LOG_FLAG_TRACE;
|
|
19
19
|
|
|
20
|
-
@interface HTTPServer (PrivateAPI)
|
|
21
|
-
|
|
22
|
-
- (void)unpublishBonjour;
|
|
23
|
-
- (void)publishBonjour;
|
|
24
|
-
|
|
25
|
-
+ (void)startBonjourThreadIfNeeded;
|
|
26
|
-
+ (void)performBonjourBlock:(dispatch_block_t)block;
|
|
27
|
-
|
|
28
|
-
@end
|
|
29
|
-
|
|
30
20
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
31
21
|
#pragma mark -
|
|
32
22
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -68,17 +58,6 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_INFO; // | HTTP_LOG_FLAG_TRACE;
|
|
|
68
58
|
// This will allow the kernel to automatically pick an open port for us
|
|
69
59
|
port = 0;
|
|
70
60
|
|
|
71
|
-
// Configure default values for bonjour service
|
|
72
|
-
|
|
73
|
-
// Bonjour domain. Use the local domain by default
|
|
74
|
-
domain = @"local.";
|
|
75
|
-
|
|
76
|
-
// If using an empty string ("") for the service name when registering,
|
|
77
|
-
// the system will automatically use the "Computer Name".
|
|
78
|
-
// Passing in an empty string will also handle name conflicts
|
|
79
|
-
// by automatically appending a digit to the end of the name.
|
|
80
|
-
name = @"";
|
|
81
|
-
|
|
82
61
|
// Initialize arrays to hold all the HTTP connections
|
|
83
62
|
connections = [[NSMutableArray alloc] init];
|
|
84
63
|
|
|
@@ -250,150 +229,6 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_INFO; // | HTTP_LOG_FLAG_TRACE;
|
|
|
250
229
|
});
|
|
251
230
|
}
|
|
252
231
|
|
|
253
|
-
/**
|
|
254
|
-
* Domain on which to broadcast this service via Bonjour.
|
|
255
|
-
* The default domain is @"local".
|
|
256
|
-
**/
|
|
257
|
-
- (NSString *)domain
|
|
258
|
-
{
|
|
259
|
-
__block NSString *result;
|
|
260
|
-
|
|
261
|
-
dispatch_sync(serverQueue, ^{
|
|
262
|
-
result = domain;
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
return result;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
- (void)setDomain:(NSString *)value
|
|
269
|
-
{
|
|
270
|
-
HTTPLogTrace();
|
|
271
|
-
|
|
272
|
-
NSString *valueCopy = [value copy];
|
|
273
|
-
|
|
274
|
-
dispatch_async(serverQueue, ^{
|
|
275
|
-
domain = valueCopy;
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* The name to use for this service via Bonjour.
|
|
282
|
-
* The default name is an empty string,
|
|
283
|
-
* which should result in the published name being the host name of the computer.
|
|
284
|
-
**/
|
|
285
|
-
- (NSString *)name
|
|
286
|
-
{
|
|
287
|
-
__block NSString *result;
|
|
288
|
-
|
|
289
|
-
dispatch_sync(serverQueue, ^{
|
|
290
|
-
result = name;
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
return result;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
- (NSString *)publishedName
|
|
297
|
-
{
|
|
298
|
-
__block NSString *result;
|
|
299
|
-
|
|
300
|
-
dispatch_sync(serverQueue, ^{
|
|
301
|
-
|
|
302
|
-
if (netService == nil)
|
|
303
|
-
{
|
|
304
|
-
result = nil;
|
|
305
|
-
}
|
|
306
|
-
else
|
|
307
|
-
{
|
|
308
|
-
|
|
309
|
-
dispatch_block_t bonjourBlock = ^{
|
|
310
|
-
result = [[netService name] copy];
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
[[self class] performBonjourBlock:bonjourBlock];
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
return result;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
- (void)setName:(NSString *)value
|
|
321
|
-
{
|
|
322
|
-
NSString *valueCopy = [value copy];
|
|
323
|
-
|
|
324
|
-
dispatch_async(serverQueue, ^{
|
|
325
|
-
name = valueCopy;
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* The type of service to publish via Bonjour.
|
|
332
|
-
* No type is set by default, and one must be set in order for the service to be published.
|
|
333
|
-
**/
|
|
334
|
-
- (NSString *)type
|
|
335
|
-
{
|
|
336
|
-
__block NSString *result;
|
|
337
|
-
|
|
338
|
-
dispatch_sync(serverQueue, ^{
|
|
339
|
-
result = type;
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
return result;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
- (void)setType:(NSString *)value
|
|
346
|
-
{
|
|
347
|
-
NSString *valueCopy = [value copy];
|
|
348
|
-
|
|
349
|
-
dispatch_async(serverQueue, ^{
|
|
350
|
-
type = valueCopy;
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* The extra data to use for this service via Bonjour.
|
|
357
|
-
**/
|
|
358
|
-
- (NSDictionary *)TXTRecordDictionary
|
|
359
|
-
{
|
|
360
|
-
__block NSDictionary *result;
|
|
361
|
-
|
|
362
|
-
dispatch_sync(serverQueue, ^{
|
|
363
|
-
result = txtRecordDictionary;
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
return result;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
- (void)setTXTRecordDictionary:(NSDictionary *)value
|
|
370
|
-
{
|
|
371
|
-
HTTPLogTrace();
|
|
372
|
-
|
|
373
|
-
NSDictionary *valueCopy = [value copy];
|
|
374
|
-
|
|
375
|
-
dispatch_async(serverQueue, ^{
|
|
376
|
-
|
|
377
|
-
txtRecordDictionary = valueCopy;
|
|
378
|
-
|
|
379
|
-
// Update the txtRecord of the netService if it has already been published
|
|
380
|
-
if (netService)
|
|
381
|
-
{
|
|
382
|
-
NSNetService *theNetService = netService;
|
|
383
|
-
NSData *txtRecordData = nil;
|
|
384
|
-
if (txtRecordDictionary)
|
|
385
|
-
txtRecordData = [NSNetService dataFromTXTRecordDictionary:txtRecordDictionary];
|
|
386
|
-
|
|
387
|
-
dispatch_block_t bonjourBlock = ^{
|
|
388
|
-
[theNetService setTXTRecordData:txtRecordData];
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
[[self class] performBonjourBlock:bonjourBlock];
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
|
|
397
232
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
398
233
|
#pragma mark Server Control
|
|
399
234
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -413,7 +248,6 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_INFO; // | HTTP_LOG_FLAG_TRACE;
|
|
|
413
248
|
HTTPLogInfo(@"%@: Started HTTP server on port %hu", THIS_FILE, [asyncSocket localPort]);
|
|
414
249
|
|
|
415
250
|
isRunning = YES;
|
|
416
|
-
[self publishBonjour];
|
|
417
251
|
}
|
|
418
252
|
else
|
|
419
253
|
{
|
|
@@ -437,10 +271,6 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_INFO; // | HTTP_LOG_FLAG_TRACE;
|
|
|
437
271
|
HTTPLogTrace();
|
|
438
272
|
|
|
439
273
|
dispatch_sync(serverQueue, ^{ @autoreleasepool {
|
|
440
|
-
|
|
441
|
-
// First stop publishing the service via bonjour
|
|
442
|
-
[self unpublishBonjour];
|
|
443
|
-
|
|
444
274
|
// Stop listening / accepting incoming connections
|
|
445
275
|
[asyncSocket disconnect];
|
|
446
276
|
isRunning = NO;
|
|
@@ -519,108 +349,6 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_INFO; // | HTTP_LOG_FLAG_TRACE;
|
|
|
519
349
|
[newConnection start];
|
|
520
350
|
}
|
|
521
351
|
|
|
522
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
523
|
-
#pragma mark Bonjour
|
|
524
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
525
|
-
|
|
526
|
-
- (void)publishBonjour
|
|
527
|
-
{
|
|
528
|
-
HTTPLogTrace();
|
|
529
|
-
|
|
530
|
-
NSAssert(dispatch_get_specific(IsOnServerQueueKey) != NULL, @"Must be on serverQueue");
|
|
531
|
-
|
|
532
|
-
if (type)
|
|
533
|
-
{
|
|
534
|
-
netService = [[NSNetService alloc] initWithDomain:domain type:type name:name port:[asyncSocket localPort]];
|
|
535
|
-
[netService setDelegate:self];
|
|
536
|
-
|
|
537
|
-
NSNetService *theNetService = netService;
|
|
538
|
-
NSData *txtRecordData = nil;
|
|
539
|
-
if (txtRecordDictionary)
|
|
540
|
-
txtRecordData = [NSNetService dataFromTXTRecordDictionary:txtRecordDictionary];
|
|
541
|
-
|
|
542
|
-
dispatch_block_t bonjourBlock = ^{
|
|
543
|
-
|
|
544
|
-
[theNetService removeFromRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
|
|
545
|
-
[theNetService scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
|
|
546
|
-
[theNetService publish];
|
|
547
|
-
|
|
548
|
-
// Do not set the txtRecordDictionary prior to publishing!!!
|
|
549
|
-
// This will cause the OS to crash!!!
|
|
550
|
-
if (txtRecordData)
|
|
551
|
-
{
|
|
552
|
-
[theNetService setTXTRecordData:txtRecordData];
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
[[self class] startBonjourThreadIfNeeded];
|
|
557
|
-
[[self class] performBonjourBlock:bonjourBlock];
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
- (void)unpublishBonjour
|
|
562
|
-
{
|
|
563
|
-
HTTPLogTrace();
|
|
564
|
-
|
|
565
|
-
NSAssert(dispatch_get_specific(IsOnServerQueueKey) != NULL, @"Must be on serverQueue");
|
|
566
|
-
|
|
567
|
-
if (netService)
|
|
568
|
-
{
|
|
569
|
-
NSNetService *theNetService = netService;
|
|
570
|
-
|
|
571
|
-
dispatch_block_t bonjourBlock = ^{
|
|
572
|
-
|
|
573
|
-
[theNetService stop];
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
[[self class] performBonjourBlock:bonjourBlock];
|
|
577
|
-
|
|
578
|
-
netService = nil;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
/**
|
|
583
|
-
* Republishes the service via bonjour if the server is running.
|
|
584
|
-
* If the service was not previously published, this method will publish it (if the server is running).
|
|
585
|
-
**/
|
|
586
|
-
- (void)republishBonjour
|
|
587
|
-
{
|
|
588
|
-
HTTPLogTrace();
|
|
589
|
-
|
|
590
|
-
dispatch_async(serverQueue, ^{
|
|
591
|
-
|
|
592
|
-
[self unpublishBonjour];
|
|
593
|
-
[self publishBonjour];
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* Called when our bonjour service has been successfully published.
|
|
599
|
-
* This method does nothing but output a log message telling us about the published service.
|
|
600
|
-
**/
|
|
601
|
-
- (void)netServiceDidPublish:(NSNetService *)ns
|
|
602
|
-
{
|
|
603
|
-
// Override me to do something here...
|
|
604
|
-
//
|
|
605
|
-
// Note: This method is invoked on our bonjour thread.
|
|
606
|
-
|
|
607
|
-
HTTPLogInfo(@"Bonjour Service Published: domain(%@) type(%@) name(%@)", [ns domain], [ns type], [ns name]);
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
* Called if our bonjour service failed to publish itself.
|
|
612
|
-
* This method does nothing but output a log message telling us about the published service.
|
|
613
|
-
**/
|
|
614
|
-
- (void)netService:(NSNetService *)ns didNotPublish:(NSDictionary *)errorDict
|
|
615
|
-
{
|
|
616
|
-
// Override me to do something here...
|
|
617
|
-
//
|
|
618
|
-
// Note: This method in invoked on our bonjour thread.
|
|
619
|
-
|
|
620
|
-
HTTPLogWarn(@"Failed to Publish Service: domain(%@) type(%@) name(%@) - %@",
|
|
621
|
-
[ns domain], [ns type], [ns name], errorDict);
|
|
622
|
-
}
|
|
623
|
-
|
|
624
352
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
625
353
|
#pragma mark Notifications
|
|
626
354
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -641,80 +369,4 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_INFO; // | HTTP_LOG_FLAG_TRACE;
|
|
|
641
369
|
[connectionsLock unlock];
|
|
642
370
|
}
|
|
643
371
|
|
|
644
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
645
|
-
#pragma mark Bonjour Thread
|
|
646
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* NSNetService is runloop based, so it requires a thread with a runloop.
|
|
650
|
-
* This gives us two options:
|
|
651
|
-
*
|
|
652
|
-
* - Use the main thread
|
|
653
|
-
* - Setup our own dedicated thread
|
|
654
|
-
*
|
|
655
|
-
* Since we have various blocks of code that need to synchronously access the netservice objects,
|
|
656
|
-
* using the main thread becomes troublesome and a potential for deadlock.
|
|
657
|
-
**/
|
|
658
|
-
|
|
659
|
-
static NSThread *bonjourThread;
|
|
660
|
-
|
|
661
|
-
+ (void)startBonjourThreadIfNeeded
|
|
662
|
-
{
|
|
663
|
-
HTTPLogTrace();
|
|
664
|
-
|
|
665
|
-
static dispatch_once_t predicate;
|
|
666
|
-
dispatch_once(&predicate, ^{
|
|
667
|
-
|
|
668
|
-
HTTPLogVerbose(@"%@: Starting bonjour thread...", THIS_FILE);
|
|
669
|
-
|
|
670
|
-
bonjourThread = [[NSThread alloc] initWithTarget:self
|
|
671
|
-
selector:@selector(bonjourThread)
|
|
672
|
-
object:nil];
|
|
673
|
-
[bonjourThread start];
|
|
674
|
-
});
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
+ (void)bonjourThread
|
|
678
|
-
{
|
|
679
|
-
@autoreleasepool {
|
|
680
|
-
|
|
681
|
-
HTTPLogVerbose(@"%@: BonjourThread: Started", THIS_FILE);
|
|
682
|
-
|
|
683
|
-
// We can't run the run loop unless it has an associated input source or a timer.
|
|
684
|
-
// So we'll just create a timer that will never fire - unless the server runs for 10,000 years.
|
|
685
|
-
#pragma clang diagnostic push
|
|
686
|
-
#pragma clang diagnostic ignored "-Wundeclared-selector"
|
|
687
|
-
[NSTimer scheduledTimerWithTimeInterval:[[NSDate distantFuture] timeIntervalSinceNow]
|
|
688
|
-
target:self
|
|
689
|
-
selector:@selector(donothingatall:)
|
|
690
|
-
userInfo:nil
|
|
691
|
-
repeats:YES];
|
|
692
|
-
#pragma clang diagnostic pop
|
|
693
|
-
|
|
694
|
-
[[NSRunLoop currentRunLoop] run];
|
|
695
|
-
|
|
696
|
-
HTTPLogVerbose(@"%@: BonjourThread: Aborted", THIS_FILE);
|
|
697
|
-
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
+ (void)executeBonjourBlock:(dispatch_block_t)block
|
|
702
|
-
{
|
|
703
|
-
HTTPLogTrace();
|
|
704
|
-
|
|
705
|
-
NSAssert([NSThread currentThread] == bonjourThread, @"Executed on incorrect thread");
|
|
706
|
-
|
|
707
|
-
block();
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
+ (void)performBonjourBlock:(dispatch_block_t)block
|
|
711
|
-
{
|
|
712
|
-
HTTPLogTrace();
|
|
713
|
-
|
|
714
|
-
[self performSelector:@selector(executeBonjourBlock:)
|
|
715
|
-
onThread:bonjourThread
|
|
716
|
-
withObject:block
|
|
717
|
-
waitUntilDone:YES];
|
|
718
|
-
}
|
|
719
|
-
|
|
720
372
|
@end
|
|
Binary file
|
|
@@ -46,28 +46,31 @@ static NSString *const SAFARI_BUNDLE_ID = @"com.apple.mobilesafari";
|
|
|
46
46
|
[self.session terminateApplicationWithBundleId:SAFARI_BUNDLE_ID];
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
- (void)
|
|
49
|
+
- (void)disabled_testCanHandleSafariInputPrompt
|
|
50
50
|
{
|
|
51
|
-
XCUIElement *urlInput = [[self.safariApp
|
|
51
|
+
XCUIElement *urlInput = [[self.safariApp
|
|
52
|
+
descendantsMatchingType:XCUIElementTypeTextField]
|
|
53
|
+
matchingPredicate:[
|
|
54
|
+
NSPredicate predicateWithFormat:@"label == 'Address' or label == 'URL'"
|
|
55
|
+
]].firstMatch;
|
|
52
56
|
if (!urlInput.exists) {
|
|
53
|
-
[[[self.safariApp descendantsMatchingType:XCUIElementTypeButton]
|
|
57
|
+
[[[self.safariApp descendantsMatchingType:XCUIElementTypeButton] matchingPredicate:[
|
|
58
|
+
NSPredicate predicateWithFormat:@"label == 'Address' or label == 'URL'"]].firstMatch tap];
|
|
54
59
|
}
|
|
55
|
-
XCTAssertTrue([urlInput fb_typeText:@"https://www.
|
|
60
|
+
XCTAssertTrue([urlInput fb_typeText:@"https://www.w3schools.com/js/tryit.asp?filename=tryjs_alert"
|
|
56
61
|
shouldClear:YES
|
|
57
62
|
error:nil]);
|
|
58
63
|
[[[self.safariApp descendantsMatchingType:XCUIElementTypeButton] matchingIdentifier:@"Go"].firstMatch tap];
|
|
59
64
|
XCUIElement *clickMeButton = [[self.safariApp descendantsMatchingType:XCUIElementTypeButton]
|
|
60
|
-
matchingPredicate:[NSPredicate predicateWithFormat:@"label == '
|
|
65
|
+
matchingPredicate:[NSPredicate predicateWithFormat:@"label == 'Try it'"]].firstMatch;
|
|
61
66
|
XCTAssertTrue([clickMeButton waitForExistenceWithTimeout:15.0]);
|
|
62
67
|
[clickMeButton tap];
|
|
63
68
|
FBAlert *alert = [FBAlert alertWithApplication:self.safariApp];
|
|
64
|
-
FBAssertWaitTillBecomesTrue([alert.text isEqualToString:@"
|
|
69
|
+
FBAssertWaitTillBecomesTrue([alert.text isEqualToString:@"I am an alert box!"]);
|
|
65
70
|
NSArray *buttonLabels = alert.buttonLabels;
|
|
66
|
-
XCTAssertEqualObjects(buttonLabels.firstObject, @"
|
|
67
|
-
XCTAssertNotNil([self.safariApp fb_descendantsMatchingXPathQuery:@"//XCUIElementTypeButton[@label='
|
|
71
|
+
XCTAssertEqualObjects(buttonLabels.firstObject, @"Close");
|
|
72
|
+
XCTAssertNotNil([self.safariApp fb_descendantsMatchingXPathQuery:@"//XCUIElementTypeButton[@label='Close']"
|
|
68
73
|
shouldReturnAfterFirstMatch:YES].firstObject);
|
|
69
|
-
XCTAssertEqualObjects(buttonLabels.lastObject, @"OK");
|
|
70
|
-
XCTAssertTrue([alert typeText:@"yolo" error:nil]);
|
|
71
74
|
XCTAssertTrue([alert acceptWithError:nil]);
|
|
72
75
|
}
|
|
73
76
|
|
package/build/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.
|
|
6
|
+
exports.resetTestProcesses = exports.checkForDependencies = exports.bundleWDASim = exports.WebDriverAgent = exports.WDA_RUNNER_BUNDLE_ID = exports.WDA_BUNDLE_ID = exports.WDA_BASE_URL = exports.PROJECT_FILE = exports.NoSessionProxy = exports.BOOTSTRAP_PATH = void 0;
|
|
9
7
|
|
|
10
8
|
require("source-map-support/register");
|
|
11
9
|
|
|
@@ -21,6 +19,10 @@ var utils = _interopRequireWildcard(require("./lib/utils"));
|
|
|
21
19
|
|
|
22
20
|
var _asyncbox = require("asyncbox");
|
|
23
21
|
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
24
26
|
const {
|
|
25
27
|
checkForDependencies,
|
|
26
28
|
bundleWDASim
|
|
@@ -57,4 +59,4 @@ if (require.main === module) {
|
|
|
57
59
|
}require('source-map-support').install();
|
|
58
60
|
|
|
59
61
|
|
|
60
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
|
62
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uI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0JVTkRMRV9JRCxcbiAgV0RBX1JVTk5FUl9CVU5ETEVfSUQsIFBST0pFQ1RfRklMRSxcbiAgV0RBX0JBU0VfVVJMLFxufTtcbiJdLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiLi4ifQ==
|
|
@@ -5,8 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.checkForDependencies = checkForDependencies;
|
|
9
8
|
exports.bundleWDASim = bundleWDASim;
|
|
9
|
+
exports.checkForDependencies = checkForDependencies;
|
|
10
10
|
|
|
11
11
|
require("source-map-support/register");
|
|
12
12
|
|
package/build/lib/constants.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.WDA_UPGRADE_TIMESTAMP_PATH = exports.WDA_SCRIPTS_ROOT = exports.
|
|
8
|
+
exports.WDA_UPGRADE_TIMESTAMP_PATH = exports.WDA_SCRIPTS_ROOT = exports.WDA_SCHEME = exports.WDA_RUNNER_BUNDLE_ID = exports.WDA_RUNNER_APP = exports.WDA_PROJECT = exports.WDA_BUNDLE_ID = exports.WDA_BASE_URL = exports.SDK_SIMULATOR = exports.SDK_DEVICE = exports.PROJECT_FILE = exports.PLATFORM_NAME_TVOS = exports.PLATFORM_NAME_IOS = exports.BOOTSTRAP_PATH = void 0;
|
|
9
9
|
|
|
10
10
|
require("source-map-support/register");
|
|
11
11
|
|