The difference between the element (...) and the element (...). GetWebElement () in Protractor

  • Why do we need element(...).getWebElement()over element(...)when both work in exactly the same way
  • Why two APIs for the same functionality
+4
source share
1 answer

Protractor- convenient wrapper around bindings WebDriverJS- javacript selenium.


getWebElement() - ElementFinder script - getWebElement() :

var elm = element(by.id("myid")); 
browser.executeScript("arguments[0].click()", elm.getWebElement());

ElementFinder :

browser.executeScript("arguments[0].click()", elm);  // not gonna work as of now
+8

Source: https://habr.com/ru/post/1651713/


All Articles