Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 947 Bytes

no-get-raw-id.md

File metadata and controls

25 lines (19 loc) · 947 Bytes

Warn about using removed getRawId() method

getRawId() method has been removed in Protractor 5.0.0 and in Selenium 3.0.0. Use getId() method instead.

Rule details

👎 Any use of the following patterns are considered errors:

expect(element(by.id("myid")).getRawId()).toEqual("id");
element.all(by.css(".class")).first().getRawId();
element(by.id("id")).all(by.css(".class")).last().getRawId();
$$(".class").first().getRawId();
$(".class").getRawId().then(function (id) { console.log(id) });

👍 The following patterns are not warnings:

expect(element(by.id("myid")).getId()).toEqual("id");
getRawId();
var html = getRawId();
elm.getRawId();