mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
1.11.5 修复post丢失data的bug
This commit is contained in:
parent
f6c0b72f39
commit
233c50f118
@ -54,7 +54,7 @@ class DriverPage(BasePage):
|
||||
@property
|
||||
def html(self) -> str:
|
||||
"""返回页面html文本"""
|
||||
return format_html(self.driver.find_element_by_xpath("//*").get_attribute("outerHTML"))
|
||||
return format_html(self.driver.find_element('xpath', "//*").get_attribute("outerHTML"))
|
||||
|
||||
@property
|
||||
def json(self) -> dict:
|
||||
@ -87,7 +87,7 @@ class DriverPage(BasePage):
|
||||
self._url_available = self._try_to_connect(to_url, times=retry, interval=interval, show_errmsg=show_errmsg)
|
||||
|
||||
try:
|
||||
self._driver.execute_script('Object.defineProperty(navigator,"webdriver",{get:() => Chrome,});')
|
||||
self._driver.execute_script('Object.defineProperty(navigator,"webdriver",{get:() => undefined,});')
|
||||
except:
|
||||
pass
|
||||
|
||||
|
@ -181,7 +181,7 @@ class SessionPage(BasePage):
|
||||
|
||||
for _ in range(times + 1):
|
||||
try:
|
||||
r = self._make_response(to_url, mode=mode, show_errmsg=True, **kwargs)[0]
|
||||
r = self._make_response(to_url, mode=mode, data=data, show_errmsg=True, **kwargs)[0]
|
||||
except Exception as e:
|
||||
err = e
|
||||
r = None
|
||||
|
2
setup.py
2
setup.py
@ -6,7 +6,7 @@ with open("README.md", "r", encoding='utf-8') as fh:
|
||||
|
||||
setup(
|
||||
name="DrissionPage",
|
||||
version="1.11.4",
|
||||
version="1.11.5",
|
||||
author="g1879",
|
||||
author_email="g1879@qq.com",
|
||||
description="A module that integrates selenium and requests session, encapsulates common page operations.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user