mardi 4 août 2015

Selenium screen capture using css selector

I am using selenium and robots framework. I am stuck on testing some bugs that are due to different rendering across firefox and chrome. As the underlying DOM is same, I cannot use selenium in a conventional way.

Is there any way to capture screenshot by particular css, xpath, jquery or any other element selector. I am right now ensuring that browser size is at a particular value, taking a screenshot and then cropping a particular part of image, comparing it to a baseline.

This is clumsy and may not scale between different browser versions. Also adding a test takes a decent amound of dev time. Is there a better way of doing cross browser testing, with or without using selenium?

BTW, I am not sure what code sample I can add here

Aucun commentaire:

Enregistrer un commentaire