Skip to content

Instantly share code, notes, and snippets.

@novodinia
Created December 30, 2013 19:47
Show Gist options
  • Save novodinia/8187093 to your computer and use it in GitHub Desktop.
Save novodinia/8187093 to your computer and use it in GitHub Desktop.

The code:

describe("When adding a car to favorites", function() {
  beforeEach(function() {
    var add_car_btn = element(by.id('add-car'));
    add_car_btn.click() // clicking the button sends the user to a new page with a table of cars
  })
  
  it("it should show up on the dashboard table", function() {
    element.all(by.repeater('car in cars')).each(function(car) {
      car.getText().then(function(val) {
        if (val == "prius") console.log("car: ", val);
      })
    })
  })
});

Message received when ran:

Using the selenium server at http://localhost:4444/wd/hub
F

Failures:
  1) When adding a car to favorites, it should show up on the dashboard table
   Message:
     timeout: timed out after 5000 msec waiting for spec to complete
   Stacktrace:
     undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment