lundi 7 octobre 2019

Can I use a baseUrl like this in protractor?

I'm trying to test a SPA where the baseUrl is https://clarity.design/news, but when I'm trying to navigate to a specific page, for example 1.3.1, the url will be https://clarity.design/1.3.1 which can't be found. It seems like it overwrites the news part from the url. This is my config:

exports.config = {
    baseUrl: 'https://clarity.design/news',
    seleniumAddress: 'http://localhost:4444/wd/hub',
    specs: ['first-spec.js']
}

And the spec is

describe('Systest', () => {
    beforeAll(async () => {
        await browser.get("/1.3.1");
    })
    it('should return home page title correctly', async () => {
        await browser.sleep(5000);
        expect(await browser.getTitle()).toContain('Page Not Found');
    });
});

So, is it possible to use a baseUrl like the one in config?

Aucun commentaire:

Enregistrer un commentaire