Performing JavaScript-based Selenium testing on an iPhone device using SauceLabs platform

Is it possible to conduct end-to-end testing on iPhones, using Selenium and SauceLabs, for a Javascript application? My current setup involves wd.js as the Selenium client library.

Here's how you can set up your browser variable with

require("wd").remote(..., "promiseChain")
:

browser.init({ 
  browserName: "iphone", 
  version: "4", 
  platform: "OS X 10.6", 
  deviceName: "iPhone", 
  "device-orientation": "portrait"
})
  .sessionCapabilities()
  .then(console.log.bind(console), console.log.bind(console))
  .quit()

The above code snippet triggers an error:

{ [Error: [init({"browserName":"iphone","version":"4","platform":"OS X 10.6","deviceName":"iPhone","device-orientation":"portrait","record-video":false,"record-screenshots":false})] The environment you requested was unavailable.] data: 'Invalid device name specified: iPhone' }

It's worth noting that I sourced this combination directly from

Interestingly, everything seems to be working smoothly for all other combinations, including those involving Android devices.

Answer №1

For it to function properly, the deviceName attribute should be eliminated.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Encountering a problem with Tailwind dynamic grid in Vue3

Greetings fellow Stack Overflow members! I am currently working on a project using Vue3 + tailwindcss. My goal is to create a dynamic grid layout similar to the following: Corrrection: Here, I am aiming for a repetitive layout with dynamic loop items ...

tips for using Node Mailer to send emails without using SMTP

Currently, I am facing an issue with sending emails through nodemailer. Although I have successfully used my gmail account for this purpose in the past, I now wish to switch to using my business email to communicate with clients on a regular basis. The cu ...

Creating grids and dividing them using a combination of CSS, JavaScript, and PHP

I've encountered an interesting challenge while working on a web project and would love some advice on how to tackle it: Within a database, I have a collection of images that I want to display in a grid format. The twist is that higher ranked images ...

What is the best way to utilize multiple props within a single callback function declared in a template literal when using React styled-components?

I recently incorporated styled components into my React project, but I'm encountering difficulty using multiple props to define styles in my components. Here's the crux of the problem: const sizes = { lg: css` width: 200px; h ...

AngularJS is unable to locate the $locationProvider module

I'm encountering an error message every time I attempt to utilize $locationProvider. Is there a specific way I should be importing the module? Error: $injector:unpr Unknown Provider Unknown provider: $locationProviderProvider <- $locationProvider ...

Leverage JSON data from an API within JavaScript, sourced and accessed through PHP

I'm seeking advice on using JSON data (loaded in PHP) with JavaScript. I am currently retrieving the JSON from an API, but someone suggested that using curl would be more efficient? I've attempted to research curl, but haven't found exactly ...

What could be causing my Bootstrap modal to fail to load dynamically?

I'm currently immersed in a fun side project, where data is fetched from a MySQL database and dynamically displayed. Everything seems to be running smoothly except for the modal display issue. The ID always matches, but the modal just won't open. ...

I encounter difficulties using my static resources in the root route of my Express.js application

Can you guide me on how to implement styles and images from the assets folder in my webpage, specifically for the root route? As an example, I have a styles.css file located at assets/styles.css. In my code, I am using app.use(express.static('assets&a ...

What causes Template.mytemplate.rendered to be triggered twice while attempting to animate real-time updates in Meteor.js?

I'm having trouble understanding the functionality of Meteor.rendered. My goal is to create a live animation effect in Meteor similar to this example question. Essentially, I want an element to blink whenever it's clicked. However, each time an ...

What is the most effective way to use a withLatestFrom within an effect when integrating a selector with props (MemoizedSelectorWithProps) sourced from the action?

I am struggling to utilize a selector with props (of type MemoizedSelectorWithProps) in an effect inside WithLatestFrom. The issue arises because the parameter for the selector (the props) is derived from the action payload, making it difficult for withLat ...

Although there may be some issues with tslint, the functionality is operating smoothly

I am in the process of learning tslint and typescript. Currently, I am facing an issue that I need help with. Could you provide guidance on how to resolve it? Despite conducting some research, I have been unable to find a solution. The relevant code snippe ...

Issues encountered when integrating a shader

I've created a shader and I'm trying to test it on Codepen. Despite having no errors in the console, the shader still isn't working as expected. Can anyone help me figure out what's going wrong? Below is my vertex shader: <script i ...

Modifying iframe elements dynamically across domains

I am faced with the challenge of embedding an iframe form from a web application that I use onto my website. This custom inquiry form is integrated into my diary within the web app, and now I want it to be displayed on my main website while maintaining a c ...

Unable to retrieve a value after deactivating a Div element

I have created a web page using MVC Razor. On this page, I included a div element with the following structure: <div class="row" id="DivDisableForView"> <div class="col-md-4"> <label for="" class="control-label" ...

Having trouble receiving a response in my JavaScript function with EJS

I'm attempting to retrieve the status of an address using the request_withd function. This function calls another function named 'is_address_exist' which is supposed to return the response status of the address as either 'yes' or & ...

Different from SimplyScroll but with added functionalities

Searching for a replacement for the now deprecated SimplyScroll with specific features. I am in need of a continuous, automatic carousel of boxes/images that halts when hovering over with the mouse (a feature SimplyScroll possesses), and allows movement ...

What is the process for establishing an if condition when there are no results returned?

Greetings, I am seeking assistance with the following issue: // Add email later on let sqlSelectBoxInformation = "SELECT DISTINCT longestDimension, box_id from box WHERE occupied ='unoccupied'"; connectionBoxInformation.query(sqlSelectBoxInfo ...

Finding the Number of Days Between Two Dates in AngularJS Using JavaScript

When I receive two dates from a web service in the format below: var dateone = "2016-08-21T07:00:00.000Z"; var datetwo = "2016-08-28T07:00:00.000Z"; var datediff = datetwo - dateone; var numdays = Math.round(datediff); console.log("Number of Days is " + n ...

Arranging an array based on various conditions and criteria

I am struggling to incorporate sorting and ordering into an array. The obstacle I am encountering involves having 5 criteria for sorting, which are: due_date === 1000 status && is_approved(boolean) is_overdue(boolean checking with date-fns using ...

Implementing automatic selection mode in Kendo MVC grid

Seeking to modify the SelectionMode of a Kendo MVC Grid, I aim to switch from single to multiple using Javascript or JQuery upon checkbox selection, and revert back when the checkbox is unchecked. Is this feasible? Additionally, I am successfully binding a ...