Skip to content
This repository has been archived by the owner on Dec 24, 2023. It is now read-only.

fix: this fixes issue12 #34

Merged
merged 3 commits into from Oct 3, 2019
Merged

fix: this fixes issue12 #34

merged 3 commits into from Oct 3, 2019

Conversation

wswebcreation
Copy link
Owner

@wswebcreation wswebcreation commented Aug 25, 2019

This PR will fix #12. I tried to solve it at the core but I got some troubles with the types. I also didn't create 2 extra unit tests for it because of the types.

@Wexx , @treyturner, @MortenGregersen or @anto-ac , any help would be appreciated.

Basically the type can be or HTMLElement[] or[HTMLElement[]] for hide and remove. The problem is that this doesn't work hide: HTMLElement[] | [HTMLElement[]]

To see that it works: https://app.eu-central-1.saucelabs.com/tests/3f810ad330b1465f8da3429c466d3825

I produces this image when I use this test

        fit('should save a fullpage screenshot', () => {
            const tag = 'fullPage';
            const imageData = browser.saveFullPageScreen(tag, { fullPageScrollTimeout: '1500',
            hideElements: [$$('h1')]});
            const filePath = `${ imageData.path }/${ tag }-${ logName }-${ resolution }.png`;

            expect(fileExists(filePath)).toBe(true, `File : "${ filePath }" could not be found`);
        });

fullPage-chrome-latest-1366x768

@anto-ac
Copy link

anto-ac commented Aug 25, 2019

I’m on holiday. Not sue when I could review this one!

@wswebcreation
Copy link
Owner Author

Enjoy your holiday!

@wswebcreation wswebcreation merged commit 4a521e1 into master Oct 3, 2019
@wswebcreation wswebcreation deleted the fix/allow-element-array branch October 3, 2019 09:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Elements objects ($$) as members of hideElements and removeElements arrays
3 participants