How to getText on an input in protractor

This is answered in the Protractor FAQ: https://github.com/angular/protractor/blob/master/docs/faq.md#the-result-of-gettext-from-an-input-element-is-always-empty The result of getText from an input element is always empty This is a webdriver quirk. and elements always have empty getText values. Instead, try: element.getAttribute(‘value’) As for question 2, yes, you should be able to use a fully qualified name for by.binding. I suspect that your … Read more

Should I be using Protractor or Karma for my end-to-end testing? [closed]

The AngularJS team recommends using Protractor as it’s going to replace angular scenario runner: Angular Scenario Runner is in maintenance mode – If you’re starting a new Angular project, consider using Protractor. quoted from AngularJs documentation. The tutorial angular-phonecat was developed a long time ago (in 2011 mainly) and has not yet been updated to … Read more

How to import js-modules into TypeScript file?

You can import the whole module as follows: import * as FriendCard from ‘./../pages/FriendCard’; For more details please refer the modules section of Typescript official docs. Recent Updated Solution : We need to tweak the tsconfig.json to allow JS modules import. credits to @paulmest, @ben-winding @crispen-gari solutions below. { “compilerOptions”: { “allowJs”: true } }

WebDriver click() vs JavaScript click()

Contrarily to what the currently accepted answer suggests, there’s nothing specific to PhantomJS when it comes to the difference between having WebDriver do a click and doing it in JavaScript. The Difference The essential difference between the two methods is common to all browsers and can be explained pretty simply: WebDriver: When WebDriver does the … Read more

toBe(true) vs toBeTruthy() vs toBeTrue()

What I do when I wonder something like the question asked here is go to the source. toBe() expect().toBe() is defined as: function toBe() { return { compare: function(actual, expected) { return { pass: actual === expected }; } }; } It performs its test with === which means that when used as expect(foo).toBe(true), it … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)