I know this has been asked multiple times, and the suggested solution has been to use something like browser.driver.switchTo('your-frame-name')
but I can't seem to access the same switchTo() method in my code.
This is my test :
import { AppPage } from './app.po';
import {browser, by, element} from 'protractor';
describe('angular-test App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
browser.driver.switchToParentFrame()
//expect(page.getParagraphText()).toEqual('Welcome to app!');
expect(element(by.id('myHeader')).getText()).toEqual('Welcome to Angular Test App! ');
});
});
switchToParentFrame()
is the only available method I get after the browser.driver.
This is how my HTML looks like
Any help is appreaciated, sorry for the vague description of the question but I'm pretty new to coding/protractor e2e testing.