Skip to content

browser.checkElement function captures someother image instead of element image #36

@NirmalAyyappan

Description

@NirmalAyyappan

I am new to WDIO, just exploring the features for WDIO - visual testing. I tried to do visual comparison of an element ["..pluginRowBlock"] on WDIO page.
The baseline image of the element which is stored under .tmp folder is something else not the screenshot of the .pluginRowBlock [expected: image contains getstarted ,watch talk etc] actual image in tmp folder is doc,api,help that whole section.

Sorry i am not able upload the screenshot:(

here is my code

describe('Visual test',()=>{
    it('Verify visual of webdriver IO page',()=>{
    // Check a screen
    browser.url('https://webdriver.io');
    //expect(browser.checkScreen('examplePaged')).toEqual(0);
    const title = browser.getTitle();
    assert.strictEqual(title, 'WebdriverIO · Next-gen browser automation test framework for Node.js');
    //assert.equal(browser.checkScreen('examplePaged'),0,"Home page is not matching with baseline"); 
   
    assert.equal(browser.checkElement($(".pluginRowBlock"),'rowblock'),0,"row block is not matching with baseline");    
    });
}); 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions