Currently, I am focused on automating an AngularJS application. Our go-to automation language is TypeScript. My aim is to scroll to a specific element and then click on it.
var element = element(by.className('learn-link'));
browser.driver.executeScript("arguments[0].scrollIntoView(true);", element);
element.click();
I am seeking confirmation if this approach using scrollIntoView() for the element is the right way to achieve it.