Executing a protractor test on Safari results in the message "Angular was not located on the webpage https://angularjs.org/"

Recently, I encountered an issue while trying to run a Protractor test on Safari, even when following the official example provided at http://www.protractortest.org/. Below are my conf.js and todo-spec.js files.

The problem arises when I set browser.ignoreSynchronization=true; (What is browser.ignoreSynchronization in Protractor?). This setting allows the test to run, but it prevents me from taking full advantage of Protractor's capabilities.

The website https://angularjs.org/ uses Angular 1.6.4.


  • Here is the log from running the test:

    $ node ./node_modules/protractor/built/cli.js conf.js --browser safari
    (node:5778) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
    [09:49:28] I/hosted - Using the selenium server at http://MAC_IP:4444/wd/hub
    [09:49:28] I/launcher - Running 1 instances of WebDriver
    Started
    ... (log continues)
    

  • When starting the webdriver manager:

    $  ./node_modules/protractor/bin/webdriver-manager start
    ... (log continues)
    

  • Contents of conf.js:

    exports.config = {
        framework: 'jasmine2',
        seleniumAddress: 'http://MAC_IP:4444/wd/hub',
        specs: ['todo-spec.js']
    };
    
  • Contents of todo-spec.js:

    describe('angularjs homepage todo list', function() {
    ... (content continues)
    

Answer №1

In Safari 10, there have been reported issues with asynchronous functionality. You can read more about this in this comment on the Protractor git repository. The comment provides a workaround specifically for Safari Desktop.

I hope this information is helpful and gives you the insight you need.

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

`In HTML, trigger blocks based on the number chosen by the user`

I am working on creating a web page where users can select the number of friends they have, and based on that input, a corresponding number of invisible boxes will be triggered. For example, if a user selects 3 friends, 3 boxes will appear for them to ente ...

Surprising results when a class is applied using jQuery

Exploring the differences between two fiddles (make sure to run the code on the jsfiddle pages to see the differences clearly). First Fiddle Simple demonstration: $("body").addClass("noScroll"); alert($("body").hasClass("noScroll")); $("body").removeCla ...

Incorporate Calendly Script into your NextJs application

I'm currently working on integrating Calendly into my Next.js project. However, I am unsure about the process. My goal is to embed it on a specific page rather than in _app or _document. Here is what I have attempted so far: import Script from &apos ...

Leverage information stored in an array within the HandsonTable Angular directive

Some of my columns in a HandsoneTable created using Angular directives are not rendering when I try to use an array as the data source with common array notation (name[0]). I'm unsure if this is supposed to work like this or if I am doing something wr ...

Setting up dynamic routes in a Vue.js Express application

I am currently working on a project that involves creating a basic Vue.js Express profile interface. This interface is responsible for retrieving profile information of a specific user based on a unique ID assigned to each user. The .get() request in Vue.j ...

AngularJS - Establishing communication between controller and view

I am facing an issue with the Angularjs view. I seem to be making a mistake somewhere and I can't figure out where the problem lies. I hope someone can assist me with this. The problem is that {{user.login}} (userRepoInfo.html file) is not being call ...

Ways to merge values across multiple arrays

There is a method to retrieve all unique properties from an array, demonstrated by the following code: var people = [{ "name": "John", "age": 30 }, { "name": "Anna", "job": true }, { "name": "Peter", "age": 35 }]; var result = []; people. ...

`Is it necessary to handle textStatus when encountering an HTTP error during an AJAX request?`

When utilizing jQuery and encountering an AJAX request failure attributed to an HTTP error (e.g., 500 Internal Server Error), what exactly is the assigned value of the textStatus parameter within the error handler function? For instance, $.ajax(...).fail( ...

Steps to transforming a standard array into a multidimensional array

I have a JSON array that is generated after submitting a form using the formSerialize function. Here is an example of how the array looks: [ {"name":"client_management-testmonitoring","value":"0"}, {"name":"client_operations-testmonitoring","v ...

What is the best method to eliminate the 2px flaws on the right edge?

Issue only observed on small screens using Android Chrome (Nexus 5x, Nexus 6) with Android 5+. Cannot replicate problem on a Nexus 4. Utilizing basic bootstrap setup and angular; unsure if related. Experiencing artifacts up to 2px wide on the right side o ...

Experience the power of Capybara without the need for RSpec

Can Capybara be utilized for live testing independently of RSpec, similar to Selenium? Is it feasible to develop scenarios and generate logs in this manner? If not, and I am required to rely on Selenium, how can I design scenarios and produce logs using ...

"Clicking and typing on the form data for the ng-click and ng-keypress

When I click a button, I want to send user input data to be displayed on the screen. However, when I click the button, it simply moves to the next value without collecting the information and displaying it on the screen. Strangely, if I press ENTER, it wor ...

Find Discounts Array

Is there a way to determine the Array of Discounts based on the Base Price initially and then calculate them against the Amount After Discount? In the image provided below, we have the Base Price. This base price may include multiple discounts. Each disc ...

Using Flask's post method with AngularJS

As a newcomer to using Flask, I've been attempting to create a function that handles a post request. However, I'm encountering an issue where the angular controller always returns an error or if there is no error, I am unable to access the data s ...

Angular.js model that is updated by checkboxes

In my project, I have created a model that is linked to several other models. For instance, let's consider a scenario similar to a Stack Overflow question associated with tags. Before making a POST or PUT request, the final Object may appear like this ...

Using AngularJS to interact with neighboring DOM elements

Imagine a scenario where there is a div containing 5 img elements. When one of these img elements is hovered over, the goal is to change the class of all the elements on its left side. <div id="stars"> <img src="star.png" data-rating="1" ng- ...

What is the best approach for retrieving values from dynamically repeated forms within a FormGroup using Typescript?

Hello and thank you for taking the time to read my question! I am currently working on an Ionic 3 app project. One of the features in this app involves a page that can have up to 200 identical forms, each containing an input field. You can see an example ...

Refreshing a Thymeleaf table dynamically without having to reload the entire page

I am currently using the Thymeleaf attribute to render data, but I am now looking to add a "Search" button without reloading the page. Within the attribute departments, I am rendering a List<Department> from the database. While I understand how to a ...

Executing a component's function from a JavaScript file

Is it possible in React to call a function or method of a component from a separate JS file in order to modify the component's state? Here are three example files: First, App.js import React,{Component} from 'react'; import Login from &ap ...

How to use jQuery to hide radio buttons that are not checked when clicking a submit

Looking to dynamically hide all unchecked radio buttons and their labels until a submit button is clicked, displaying only the checked radio button. <form method="post"> <input type="radio" name="radiobtn"> <label for="first">Fir ...