Update test_workflow.py

This commit is contained in:
Leon 2023-06-03 02:10:26 +02:00 committed by GitHub
parent 618e47de35
commit dc7dd12f05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -55,11 +55,12 @@ def main():
print(driver.current_url) print(driver.current_url)
logger.info('trying to save a screenshot via imgur') logger.info('trying to save a screenshot via imgur')
# driver.reconnect() # driver.reconnect()
driver.save_screenshot('/tmp/screenshot.jpg') driver.save_screenshot('/tmp/screenshot.png')
driver.get('https://imgur.com/upload') driver.get('https://imgur.com/upload')
driver.find_element('css selector', 'input').send_keys('/tmp/screenshot.jpg') driver.find_element('css selector', 'input').send_keys('/tmp/screenshot.jpg')
time.sleep(2) time.sleep(5)
logger.info('A SCREENSHOT IS SAVED ON %s' % driver.current_url) logger.info('A SCREENSHOT IS SAVED ON %s' % driver.current_url)
time.sleep(5) time.sleep(5)
driver.quit() driver.quit()