一:Appltools下載: 新建: .py文件 ...
一:Appltools下載:
pip install eyes-selenium==3.16.2
二:
註冊:Appltools賬號:
https://applitools.com/sign-up
三、獲取:API:
新建: .py文件
from selenium import webdriver from applitools.selenium import Eyes class HelloWorld: global driver eyes = Eyes() # Initialize the eyes SDK and set your private API key. eyes.api_key = 'lxxxxxxx' try: # Open a Chrome browser. driver = webdriver.Chrome() # Start the test and set the browser's viewport size to 800x600. eyes.open(driver, "Hello World!", "My first Selenium Python test!", {'width': 800, 'height': 600}) # Navigate the browser to the "hello world!" web-site. driver.get('https://applitools.com/helloworld') # Visual checkpoint #1. eyes.check_window('Hello!') # Click the 'Click me!' button. driver.find_element_by_css_selector('button').click() # Visual checkpoint #2. eyes.check_window('Click!') # End the test. eyes.close() finally: # Close the browser. driver.quit() # If the test was aborted before eyes.close was called, ends the test as aborted. eyes.abort_if_not_closed()
運行即可:
查看分運行後分析結果:
https://applitools.com/users/login
下麵奉上Applitools官方網站:
https://applitools.com/tutorials/
Applitools更多sdk:
https://applitools.com/tutorial
Applitools文檔:
https://applitools.com/docs
Applitools演示:
https://applitools.com/request-demo?utm_source=tutorials
Applitools知識庫:
https://help.applitools.com/hc/en-us/