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

Tips on how to interact with a button labeled <input type =Button> when using Selenium

What is the correct way to click on a button when the input type is set to button? The code I am using doesn't seem to work. <p> <img class="getdata-button" style="float:right;" src="/common/images/btn-get-data.gif&qu ...

Sharing data between view and controller in Laravel: a guide

Currently, I am developing a product cart feature that includes subtotal and grand total values displayed within <span> tags. My goal is to pass the grand total value to the controller for further processing. However, I encountered an issue where the ...

leveraging third party plugins to implement callbacks in TypeScript

When working with ajax calls in typical javascript, I have been using a specific pattern: myFunction() { var self = this; $.ajax({ // other options like url and stuff success: function () { self.someParsingFunction } } } In addition t ...

Display the chosen option in the console by using onChange() function; this is analogous to how onSelect()

I'm having trouble getting the value of a select element to log in the console. I managed to do this with an onSelect() method, but the onChange() method isn't returning anything. Here's what I tried with the onChange() method: <Form.Gr ...

Selenium was unsuccessful in finding the text on the webpage

Trying to extract Amazon reviews for a specific product, the text for ratings cannot be located using selenium. However, it can be easily extracted using soup. Link to page: Sample code using Soup: link='same link as mentioned above' url=requ ...

Refresh the page in Angular 2

Hey there! I recently started using Angular 2 and ran into an issue with page reloads. Whenever I navigate to a different page and then press the back button, the page automatically reloads. Can someone assist me in finding a solution to prevent this fro ...

Identify and sort JSON objects based on keys with multiple values

My JSON file contains objects structured like this: [ { "name" : "something", "brand": "x", "category" : "cars" }, { "name" : "something2 ...

Is there a way to update a JSON key using the "onchange" function in React?

I'm facing an issue. I have a form with two inputs. The first input is for the key and the second input is for the value. I need to update the values in the states whenever there is a change in the input fields, but I'm unsure of how to accomplis ...

Single Submit Button with Multistep Form

I'm working on an Angular multi-step form similar to this example. How can I include a save button for each step? Is it feasible to save data separately for each step? For example, when the user is in 'form 1', only save the data from &apos ...

Refreshing browser data with JQuery ajax when the browser is refreshed

Is there a way in JavaScript or jQuery to stop the page from refreshing (F5) and only update certain parts of the page using Ajax? I attempted the following code, but it did not work: $(window).bind('beforeunload', function(event) { ...

Attempting to create a functional action listener for a deck of cards game

I'm currently working on a game and want to make an image appear blank when clicked on, to simulate it disappearing. Specifically, this is for a tri peaks solitaire game. I have a function that tests the validity of playing a card, but I'm strugg ...

AngularJS directive that performs asynchronous validation upon blur

I'm working on developing a directive that validates email addresses provided by users through asynchronous web requests. While the functionality is sound, I've encountered an issue where asynchronous calls are triggered every time a user types a ...

I've been struggling with this javascript error for three days, how can I finally resolve it?

Currently developing a website using react js, but encountering an error every time I try to push to my github repository. Run npm run lint npm run lint shell: /bin/bash -e {0} <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail= ...

What are the steps to creating a unique event within an AngularJs service?

In the midst of my AngularJs project, I find myself faced with a dilemma. I have a service designed to manage button events, but I want another service to handle these events indirectly without directly interacting with the buttons themselves. So, my goal ...

Adjustable ember count within Intercom HTML using Selenium and Python

My goal is to automate tasks at my workplace, but I am facing some challenges. Due to the lack of admin access on my work Intercom App, I have resorted to using Selenium. I need to input "Hey" into the chat box on Intercom and send the message successfull ...

How to incorporate markdown files as strings in Next.js

Is there a way to bring in markdown files as strings in Next.js for use on both the client and server sides? ...

Why isn't changing the property of a Sequelize instance having any effect?

While I've successfully used the standard instance syntax in the past, I'm facing a challenge with updating an instance retrieved from the database in this specific section of my code. ... const userInstance = await db.models.Users.findOne({wher ...

React Router Blank Page Conundrum

In a new project, I'm experiencing an issue where the content is not loading in despite using a similar React-Route setup that worked in a previous project. When I create a nav link in the root directory, it changes the path but the screen remains whi ...

I am looking to consolidate my array of objects into a single object with distinct keys

Hey there! I'm looking to showcase the expenses for each category throughout the months of the year. Here's an example: {Month: "January", Food: 610, foodColor: "#063951", Others: 121, othersColor: "#C13018", …} Fo ...

Exploring and Troubleshooting HTML and JavaScript with Visual Studio Code Debugger

Visual Studio Code Version 1.10.2 Windows 10 I am currently experimenting with VS Code and would like to debug some basic HTML and JavaScript code. The instructional video found at http://code.visualstudio.com/docs/introvideos/debugging mentions that ...