1. selenium原理
1.1 使用selenium实现自动化测试,主要需要三部分
- 自动化测试代码, python+selenium(client),发送请求给浏览器的驱动
- 浏览器驱动:解析自动化代码,解析后把他们发送给浏览器
- 浏览器:执行浏览器驱动发来的指令,完成工程师想要的操作
1.2 selenium相关名词解释
webdriver: Controls a browser by sending commands to a remote server
RemoteConnection: A connection with the Remote WebDriver server
RemoteWebDriver: Controls a browser by sending commands to a remote server
1.3 selenium工作原理
- selenium client会先初始化一个service服务,通过WebDriver启动chromedriver.exe浏览器驱动程序,把启动的浏览器驱动服务作为WebDriver的remote server,
- 再通过RemoteWebDriver给发remote server送一个Command.NEW_SESSION的指令,去新建一个session即打开浏览器, 并获得获得sessionid, 如果再次对浏览器操作需要携带此ID
- 后续所有的selenium操作,都是通过RemoteConnection链接到remote server,发送对应的command指令(发送指令的过程就是使用execute()方法调用_request()方法通过urlib3向Remote Server发送HTTP请求)
- Remote Server收到HTTP请求后,解析请求,根据请求的内容驱动浏览器完成对应操作
- 浏览器再把操作后得到的结果数据作为HTTP Response的body通过驱动程序返回给测试脚本
2. 使用selenium驱动浏览器
- python+selenium实现打开百度浏览器,并搜索python
from selenium import webdriver
from selenium.webdriver.common.by import By
# 打开chrome浏览器
driver = webdriver.Chrome()
# 打开百度网址
driver.get('http://www.baidu.com')
time.sleep(5)
#找到搜索输入框并输入Python
driver.find_element(By.ID, 'kw').send_keys('Python')
#找到搜索按钮并点击搜索
driver.find_element(By.ID, 'su').click()
time.sleep(5)
driver.quit()
- 执行过程中的日志
DEBUG:selenium.webdriver.common.selenium_manager:Selenium Manager binary found at: /Users/chm/PycharmProjects/api_automaition_test/venv/lib/python3.9/site-packages/selenium/webdriver/common/macos/selenium-manager
DEBUG:selenium.webdriver.common.selenium_manager:Executing process: /Users/chm/PycharmProjects/api_automaition_test/venv/lib/python3.9/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --debug --output json
DEBUG:selenium.webdriver.common.selenium_manager:Found chromedriver 120.0.6099.109 in PATH: /Users/chm/PycharmProjects/api_automaition_test/venv/bin/chromedriver
DEBUG:selenium.webdriver.common.selenium_manager:chrome not found in PATH
DEBUG:selenium.webdriver.common.selenium_manager:chrome not found in the system
DEBUG:selenium.webdriver.common.selenium_manager:Required browser: chrome 120.0.6099.109
DEBUG:selenium.webdriver.common.selenium_manager:chrome 120.0.6099.109 already exists
DEBUG:selenium.webdriver.common.selenium_manager:chrome 120.0.6099.109 is available at /Users/chm/.cache/selenium/chrome/mac-x64/120.0.6099.109/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing
DEBUG:selenium.webdriver.common.selenium_manager:Required driver: chromedriver 120.0.6099.109
DEBUG:selenium.webdriver.common.selenium_manager:Driver path: /Users/chm/PycharmProjects/api_automaition_test/venv/bin/chromedriver
DEBUG:selenium.webdriver.common.selenium_manager:Browser path: /Users/chm/.cache/selenium/chrome/mac-x64/120.0.6099.109/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing
DEBUG:selenium.webdriver.common.selenium_manager:Using driver at: /Users/chm/PycharmProjects/api_automaition_test/venv/bin/chromedriver
DEBUG:selenium.webdriver.common.service:Started executable: `/Users/chm/PycharmProjects/api_automaition_test/venv/bin/chromedriver` in a child process with pid: 20830
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:49839/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "pageLoadStrategy": "normal", "browserVersion": null, "goog:chromeOptions": {"extensions": [], "binary": "/Users/chm/.cache/selenium/chrome/mac-x64/120.0.6099.109/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing", "args": []}}}}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:49839
DEBUG:urllib3.connectionpool:http://localhost:49839 "POST /session HTTP/1.1" 200 892
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"120.0.6099.109","chrome":{"chromedriverVersion":"120.0.6099.109 (3419140ab665596f21b385ce136419fde0924272-refs/branch-heads/6099@{#1483})","userDataDir":"/var/folders/wm/vd_35pzd6176_q6l24x1bn2h0000gn/T/.org.chromium.Chromium.RCyQ0T"},"fedcm:accounts":true,"goog:chromeOptions":{"debuggerAddress":"localhost:49848"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"mac","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify","webauthn:extension:credBlob":true,"webauthn:extension:largeBlob":true,"webauthn:extension:minPinLength":true,"webauthn:extension:prf":true,"webauthn:virtualAuthenticators":true},"sessionId":"3ffd4652cd07597a0a713a53a55aa208"}} | headers=HTTPHeaderDict({'Content-Length': '892', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:49839/session/3ffd4652cd07597a0a713a53a55aa208/url {"url": "http://www.baidu.com"}
DEBUG:urllib3.connectionpool:http://localhost:49839 "POST /session/3ffd4652cd07597a0a713a53a55aa208/url HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":null} | headers=HTTPHeaderDict({'Content-Length': '14', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:49839/session/3ffd4652cd07597a0a713a53a55aa208/element {"using": "css selector", "value": "[id=\"kw\"]"}
DEBUG:urllib3.connectionpool:http://localhost:49839 "POST /session/3ffd4652cd07597a0a713a53a55aa208/element HTTP/1.1" 200 94
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":{"element-6066-11e4-a52e-4f735466cecf":"933DB01416BB6CBBFCBCB080FEFE5692_element_7"}} | headers=HTTPHeaderDict({'Content-Length': '94', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:49839/session/3ffd4652cd07597a0a713a53a55aa208/element/933DB01416BB6CBBFCBCB080FEFE5692_element_7/value {"text": "Python", "value": ["P", "y", "t", "h", "o", "n"]}
DEBUG:urllib3.connectionpool:http://localhost:49839 "POST /session/3ffd4652cd07597a0a713a53a55aa208/element/933DB01416BB6CBBFCBCB080FEFE5692_element_7/value HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":null} | headers=HTTPHeaderDict({'Content-Length': '14', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:49839/session/3ffd4652cd07597a0a713a53a55aa208/element {"using": "css selector", "value": "[id=\"su\"]"}
DEBUG:urllib3.connectionpool:http://localhost:49839 "POST /session/3ffd4652cd07597a0a713a53a55aa208/element HTTP/1.1" 200 95
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":{"element-6066-11e4-a52e-4f735466cecf":"933DB01416BB6CBBFCBCB080FEFE5692_element_23"}} | headers=HTTPHeaderDict({'Content-Length': '95', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:49839/session/3ffd4652cd07597a0a713a53a55aa208/element/933DB01416BB6CBBFCBCB080FEFE5692_element_23/click {}
DEBUG:urllib3.connectionpool:http://localhost:49839 "POST /session/3ffd4652cd07597a0a713a53a55aa208/element/933DB01416BB6CBBFCBCB080FEFE5692_element_23/click HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":null} | headers=HTTPHeaderDict({'Content-Length': '14', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:DELETE http://localhost:49839/session/3ffd4652cd07597a0a713a53a55aa208 {}
DEBUG:urllib3.connectionpool:http://localhost:49839 "DELETE /session/3ffd4652cd07597a0a713a53a55aa208 HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":null} | headers=HTTPHeaderDict({'Content-Length': '14', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
3.原理应用一 - 通过execute(driver_command, params)来驱动浏览器
- excute发送命令,实现打开百度浏览器,并搜索python
# 开发时间:2024/1/8 18:48
import time
import logging
from selenium.webdriver.chrome.webdriver import WebDriver
from selenium.webdriver.common.by import By
logging.basicConfig(level=logging.DEBUG)
# 生成了一个浏览器驱动对象
# driver = webdriver.Chrome()
driver = WebDriver()
# driver.get('http://www.baidu.com') # selenium调用了Command.GET命令,传递URL对应参数
driver.execute('get', {"url": 'http://www.baidu.com'})
time.sleep(1)
# driver.find_element(By.ID, 'kw').send_keys('Python') # 通过find_element返回一个webElement对象,再去调用send_keys方法
el = driver.execute('findElement', {"using": 'css selector', "value": '[id="kw"]'})["value"]
el._execute('sendKeysToElement', {"text": "Python", "value": ["P", "y", "t", "h", "o", "n"]})
# driver.find_element(By.ID, 'su').click()
el1 = driver.execute('findElement', {"using": 'css selector', "value": '[id="su"]'})["value"]
el1._execute('clickElement')
time.sleep(5)
driver.quit()
- 执行日志
DEBUG:selenium.webdriver.common.selenium_manager:Selenium Manager binary found at: /Users/chm/PycharmProjects/api_automaition_test/venv/lib/python3.9/site-packages/selenium/webdriver/common/macos/selenium-manager
DEBUG:selenium.webdriver.common.selenium_manager:Executing process: /Users/chm/PycharmProjects/api_automaition_test/venv/lib/python3.9/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --debug --output json
DEBUG:selenium.webdriver.common.selenium_manager:Found chromedriver 120.0.6099.109 in PATH: /Users/chm/PycharmProjects/api_automaition_test/venv/bin/chromedriver
DEBUG:selenium.webdriver.common.selenium_manager:chrome not found in PATH
DEBUG:selenium.webdriver.common.selenium_manager:chrome not found in the system
DEBUG:selenium.webdriver.common.selenium_manager:Required browser: chrome 120.0.6099.109
DEBUG:selenium.webdriver.common.selenium_manager:chrome 120.0.6099.109 already exists
DEBUG:selenium.webdriver.common.selenium_manager:chrome 120.0.6099.109 is available at /Users/chm/.cache/selenium/chrome/mac-x64/120.0.6099.109/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing
DEBUG:selenium.webdriver.common.selenium_manager:Required driver: chromedriver 120.0.6099.109
DEBUG:selenium.webdriver.common.selenium_manager:Driver path: /Users/chm/PycharmProjects/api_automaition_test/venv/bin/chromedriver
DEBUG:selenium.webdriver.common.selenium_manager:Browser path: /Users/chm/.cache/selenium/chrome/mac-x64/120.0.6099.109/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing
DEBUG:selenium.webdriver.common.selenium_manager:Using driver at: /Users/chm/PycharmProjects/api_automaition_test/venv/bin/chromedriver
DEBUG:selenium.webdriver.common.service:Started executable: `/Users/chm/PycharmProjects/api_automaition_test/venv/bin/chromedriver` in a child process with pid: 4266
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:52665/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "pageLoadStrategy": "normal", "browserVersion": null, "goog:chromeOptions": {"extensions": [], "binary": "/Users/chm/.cache/selenium/chrome/mac-x64/120.0.6099.109/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing", "args": []}}}}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:52665
DEBUG:urllib3.connectionpool:http://localhost:52665 "POST /session HTTP/1.1" 200 892
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"120.0.6099.109","chrome":{"chromedriverVersion":"120.0.6099.109 (3419140ab665596f21b385ce136419fde0924272-refs/branch-heads/6099@{#1483})","userDataDir":"/var/folders/wm/vd_35pzd6176_q6l24x1bn2h0000gn/T/.org.chromium.Chromium.bLnOuK"},"fedcm:accounts":true,"goog:chromeOptions":{"debuggerAddress":"localhost:52670"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"mac","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify","webauthn:extension:credBlob":true,"webauthn:extension:largeBlob":true,"webauthn:extension:minPinLength":true,"webauthn:extension:prf":true,"webauthn:virtualAuthenticators":true},"sessionId":"977f3edab226d7e3cac1a50e6a9cb1a1"}} | headers=HTTPHeaderDict({'Content-Length': '892', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:52665/session/977f3edab226d7e3cac1a50e6a9cb1a1/url {"url": "http://www.baidu.com"}
DEBUG:urllib3.connectionpool:http://localhost:52665 "POST /session/977f3edab226d7e3cac1a50e6a9cb1a1/url HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":null} | headers=HTTPHeaderDict({'Content-Length': '14', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:52665/session/977f3edab226d7e3cac1a50e6a9cb1a1/element {"using": "css selector", "value": "[id=\"kw\"]"}
DEBUG:urllib3.connectionpool:http://localhost:52665 "POST /session/977f3edab226d7e3cac1a50e6a9cb1a1/element HTTP/1.1" 200 95
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":{"element-6066-11e4-a52e-4f735466cecf":"D8FCEFF5022E96524C90DB63CC2EF04A_element_11"}} | headers=HTTPHeaderDict({'Content-Length': '95', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:52665/session/977f3edab226d7e3cac1a50e6a9cb1a1/element/D8FCEFF5022E96524C90DB63CC2EF04A_element_11/value {"text": "Python", "value": ["P", "y", "t", "h", "o", "n"]}
DEBUG:urllib3.connectionpool:http://localhost:52665 "POST /session/977f3edab226d7e3cac1a50e6a9cb1a1/element/D8FCEFF5022E96524C90DB63CC2EF04A_element_11/value HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":null} | headers=HTTPHeaderDict({'Content-Length': '14', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:52665/session/977f3edab226d7e3cac1a50e6a9cb1a1/element {"using": "css selector", "value": "[id=\"su\"]"}
DEBUG:urllib3.connectionpool:http://localhost:52665 "POST /session/977f3edab226d7e3cac1a50e6a9cb1a1/element HTTP/1.1" 200 95
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":{"element-6066-11e4-a52e-4f735466cecf":"D8FCEFF5022E96524C90DB63CC2EF04A_element_22"}} | headers=HTTPHeaderDict({'Content-Length': '95', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:52665/session/977f3edab226d7e3cac1a50e6a9cb1a1/element/D8FCEFF5022E96524C90DB63CC2EF04A_element_22/click {}
DEBUG:urllib3.connectionpool:http://localhost:52665 "POST /session/977f3edab226d7e3cac1a50e6a9cb1a1/element/D8FCEFF5022E96524C90DB63CC2EF04A_element_22/click HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":null} | headers=HTTPHeaderDict({'Content-Length': '14', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:DELETE http://localhost:52665/session/977f3edab226d7e3cac1a50e6a9cb1a1 {}
DEBUG:urllib3.connectionpool:http://localhost:52665 "DELETE /session/977f3edab226d7e3cac1a50e6a9cb1a1 HTTP/1.1" 200 14
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":null} | headers=HTTPHeaderDict({'Content-Length': '14', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
3. 原理应用二 - 使用request来驱动浏览器
- 双击chromedriver程序,启动Chrome,默认的port为9515
Last login: Mon Jan 8 23:12:54 on ttys000
/Users/chm/Downloads/chromedriver-mac-x64/chromedriver ; exit;
chm@mac ~ /Users/chm/Downloads/chromedriver-mac-x64/chromedriver ; exit;
Starting ChromeDriver 120.0.6099.109 (3419140ab665596f21b385ce136419fde0924272-refs/branch-heads/6099@{#1483}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
- 通过request库向chromedriver发送命令,实现打开百度浏览器,并搜索python
# 开发时间:2024/1/8 18:47
import logging
import time
import requests
logging.basicConfig(level=logging.DEBUG)
# 打开chrome浏览器
params = {"capabilities": {
"firstMatch": [{}],
"alwaysMatch": {"browserName": "chrome",
"pageLoadStrategy": "normal",
"platformName": "any",
"goog:chromeOptions": {"extensions": [],
"binary": "/Users/chm/.cache/selenium/chrome/mac-x64/120.0.6099.109/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing",
"args": []}
}},
'desiredCapabilities': {'browserName': 'chrome',
'version': '',
'platform': 'ANY',
'goog:chromeOptions': {'extensions': [], 'args': []}}
}
base_url = 'http://localhost:9515'
s = requests.Session()
res = s.request('POST', base_url+'/session', json=params)
# 获取sessionID值
sessionId = res.json()["value"]["sessionId"]
# 打开网址
datas1 = {'url': 'http://www.baidu.com'}
url1 = base_url + '/session/{}/url'.format(sessionId)
res1 = s.request("POST", url1, json=datas1)
time.sleep(1)
datas2 = {"using": "css selector", "value": "[id=\"kw\"]"}
url2 = base_url + '/session/{}/element'.format(sessionId)
res2 = s.request("POST", url2, json=datas2)
ele_id2 = res2.json()["value"].values()
# 搜索框输入python
datas3 = {"text": "Python", "value": ["P", "y", "t", "h", "o", "n"]}
url3 = base_url + '/session/{}/element/{}/value'.format(sessionId, *ele_id2)
res3 = s.request("POST", url3, json=datas3)
# 找到搜索按钮
datas4 = {"using": "css selector", "value": "[id=\"su\"]"}
url4 = base_url + '/session/{}/element'.format(sessionId)
res4 = s.request("POST", url4, json=datas4)
ele_id4 = res4.json()["value"].values()
# 点击搜索
datas5 = {}
url5 = base_url + '/session/{}/element/{}/click'.format(sessionId, *ele_id4)
res5 = s.request("POST", url5, json=datas5)
time.sleep(5)
datas6 = {}
url6 = base_url + '/session/{}'.format(sessionId)
res6 = s.request("DELETE", url6, json=datas6)
- 执行过程中的日志
DEBUG:urllib3.connectionpool:http://localhost:9515 "POST /session HTTP/1.1" 200 892
DEBUG:urllib3.connectionpool:http://localhost:9515 "POST /session/cee7ecbf02e39791b81055bf8ae7529b/url HTTP/1.1" 200 14
DEBUG:urllib3.connectionpool:http://localhost:9515 "POST /session/cee7ecbf02e39791b81055bf8ae7529b/element HTTP/1.1" 200 94
DEBUG:urllib3.connectionpool:http://localhost:9515 "POST /session/cee7ecbf02e39791b81055bf8ae7529b/element/E5745B30255BDE85A3F2536216CFEC9C_element_8/value HTTP/1.1" 200 14
DEBUG:urllib3.connectionpool:http://localhost:9515 "POST /session/cee7ecbf02e39791b81055bf8ae7529b/element HTTP/1.1" 200 95
DEBUG:urllib3.connectionpool:http://localhost:9515 "POST /session/cee7ecbf02e39791b81055bf8ae7529b/element/E5745B30255BDE85A3F2536216CFEC9C_element_23/click HTTP/1.1" 200 14
DEBUG:urllib3.connectionpool:http://localhost:9515 "DELETE /session/cee7ecbf02e39791b81055bf8ae7529b HTTP/1.1" 200 14