import {element, by} from "protractor"; import {AbstractPage} from "./abstract-page.po"; export class AbstractHeaderPage extends AbstractPage { validatePageHeadline(headline: string) { const head = element(by.css('h1')); expect(head.getText()).toBe(headline); } clickBrandLink(linkText: string) { const headerEntry = element(by.linkText(linkText)); headerEntry.click() } clickSchnellzugriffFollowedBy(linkText: string) { // starts with css Selector: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors const schnellzugriffBtn = element(by.className('dropdown')); schnellzugriffBtn.click(); schnellzugriffBtn.element(by.linkText(linkText)).click(); } }