1

I tried the following but got an error : expect undefined toBe "/"

    browser().navigateTo('/');
    expect(browser().location().url()).toBe("/");
    expect(document.title).toBe("something");

Page does have a title "something".

Rajiv
  • 2,352
  • 1
  • 22
  • 25

1 Answers1

2

Since the test website runs in a frame, document.title would not work.

However, you can use this:

expect(element('title').text()).toBe("something");
Eric Zhang
  • 672
  • 1
  • 4
  • 13