Tuesday, 30 May 2017

Devtools-protocol working at the DOM

I would like create test for the my website. I must click the button that open popup and scrolling div. I have problem with "update DOM structure on the page". I don't see current DOM after click.

When I run the code, which click the button in Runtime.runScript/Runtime.evaluate in the structure DOM I don't see new elements. After run next Runtime.runScript/Runtime.evaluate the object Runtime has update DOM structure.

   Runtime.evaluate({expression: 'CLICK THE BUTTON'});
   Runtime.evaluate({expression: 'NEXT ACTION'});
   Runtime.evaluate({expression: 'NEXT ACTION'});
    /* .... */

Are there any solutions that have the current DOM structure all the time?

Runtime.evaluate({expression: 'CLICK THE BUTTON, SCORLLING, COMPLETE THE FORM...'});

I recently used phantomJS, but it's not efficient. I preffer nodejs.



via viko

No comments:

Post a Comment