mistadikay
10/5/2017 - 8:48 AM

webdriver debugging

beforeAll(() => browser.waitForExist('body'));

it('rendered on the page', () => {
  //   <script type="text/javascript">
  //   window.jsErrors = [];
  //   window.jsErrors.push('test');
  //   window.jsErrors = JSON.stringify(window.jsErrors);
  //   // window.onerror = function(e) {
  //   //   window.jsErrors.push(e.message);
  //   // };
  // </script>

  const stuff = function() {
    return window.stuff;
  };
  const result = browser.execute(stuff);
  console.log(result.value);
  expect(true).toBeTruthy();