I have a problem, when I try to rebuild my project, I get the following error:
Type 'By' has no properties in common with type 'Locator'
Can someone please point me in the right direction?
This is a bug in Protractor 4.x / Webdriver. The method elementexpects, Locatorbut by.cssreturns an object webdriver.by. To fix this compilation error, you need to attribute it to Locatorhow:
element
Locator
by.css
webdriver.by
import { Locator } from 'protractor/built/locators'; ... element(<Locator>by.css('h1'))
Verify that TypeScript "TypeScript 2.2" is installed. You should not get an error if you are using "TypeScript 2.2".
@bjorkblom, thanks. Your lines helped a lot.
Source: https://habr.com/ru/post/1683670/More articles:Access Specifiers and Virtual Functions - c ++Svg click events not working properly - javascriptwebpack using nodejs - node.jsCompiling a project using buck, I have no complaints jdk - javaPython - get all variable names for an object in global scope - pythonIgnore function in OCaml elegantly - ocamlCloud functions for handling Firebase errors - node.jsHow to add Kotlin support for regular Java Lib in Android? - androidOverride used classes in parent class - pythonFatal error with 8-bit quantization in Tensorflow - tensorflowAll Articles