By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS Device Farm

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Unable to connect to another machine from iOS using RemoteWebDriver

Hello everybody. I'm using AWS Device Farm to run my tests. This is web to mobile testing for video calls, where both desktop pc and mobile phone must be used in one framework. I have a problem to connect to my remote machine in test while using iOS, but everything is fine with Android. I have both Android and iOS applications for mobile testing. The steps I do to run tests using AWS device farm: 1. We have a remote machine with open static IP address where I have a selenium-server-standalone started; 2. I put my project to AWS Device Farm -> Mobile device testing project -> Create a new project; 3. I fill out all the blanks, upload my application, select Java Appium TestNG, set configuration, create device pool and launch run; 4. Project goes to AWS Device Farm and while method 'setup' is invokes both the remote machine and selected mobile device and tests run; When I use my Android application, the test is able to connect to my remote machine and then invoke Android phone, then tests run in parallel on both web pc and mobile device. But when I try to do the same thing with iOS application, I have an unknown problem. I do the same steps with Android. So, the difference is only that it is iOS phone. And when I try to connect to my remote machine, the test skips. Without any log or comment...just skips and that's it. The way I connect to my machine from AWS Device farm mobile project: @BeforeTest public void setUp() { //web DesiredCapabilities dc = new DesiredCapabilities(); dc.setBrowserName("chrome"); dc.setPlatform(Platform.ANY); URL remoteHostURL = new URL("http://x.x.x.x:4444/wd/hub"); DRIVER_WEB.set(new RemoteWebDriver(remoteHostURL, dc)); //mobile capabilities = CapabilityManager.getAndroidCapabilities(); DRIVER_MOBILE.set(new AppiumDriver<MobileElement>(remoteAppiumHostURL, capabilities)); ... } What could cause this problem? Cos it works only for Android, but doesn't work for iOS. I'd be very thankful to get any help from you!
1
answers
0
votes
24
views
asked 2 years ago

WebDriver Instance for mobile web testing

I'm working on adapting functional tests of a web to be able to use Device Farm as the device pool for testing in mobile devices. The tests are written in Java, using TestNG and Appium, and i have no problems launching them in desktop browsers locally or in my android phone through a local installation of Appium. I have adapted the pom.xml following the guidelines in <https://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-appium.html> , but i haven't found anything in the documentation stating how i should instantiate WebDriver. I have also reviewed and tested with the method to instantiate it as a RemoteWebDriver using the sdk like this: String myProjectARN = "arn:evicefarm:us-west-2:XXXXXXXXXX:testgrid-project:XXXXXXXX"; DeviceFarmClient client = DeviceFarmClient.builder() .region(Region.US_WEST_2) .build(); CreateTestGridUrlRequest request = CreateTestGridUrlRequest.builder() .expiresInSeconds(300) .projectArn(myProjectARN) .build(); CreateTestGridUrlResponse response = client.createTestGridUrl(request); URL testGridUrl = new URL(response.url()); WebDriver driver = new RemoteWebDriver(testGridUrl, DesiredCapabilities.chrome()); This works fine for testing in desktop environments, but if i try to adapt it to android environment, i get the following error: \[TestNG] software.amazon.awssdk.services.devicefarm.model.DeviceFarmException: User: arn:aws:sts::XXXXXXXXXXXXX:assumed-role/EC2DeviceHostRole/XXXXXXXXXXXXXXXX is not authorized to perform: devicefarm:CreateTestGridUrl on resource: arn:aws:devicefarm:us-west-2:XXXXXXXXXXXXX:project:XXXXXXXXXXXXXXXXXXXXXXXXX (Service: DeviceFarm, Status Code: 400, Request ID: XXXXXXXXXXXXXXXXXXXXXX, Extended Request ID: null) How should WebDriver be instantiated for mobile tests? My goal is to run this tests both in Android and iOS devices.
2
answers
0
votes
58
views
asked 2 years ago