When I hit the below url in browser "https://192.168.xx.xxx/Test/ScreenCapture" I get the screenshot of the device screen under test in the browser.
How do I add the screenshot in my pytest html test report. Currently I am using below code which captures screen shot in the test directory specified.
url = 'https://192.168.xx.xxx/Test/ScreenCapture'
driver.get(url) driver.save_screenshot('/home/tests/screen.png')
I am running my pytest with below command : py.test --html=report.html --self-contained-html screentest.py