当前位置: 首页 > news >正文

网站主页模板即刻搜索引擎入口

网站主页模板,即刻搜索引擎入口,天津网站建设方案服务,北京模板网站开发导航和页面操作 goto(url: str, **kwargs: Any): 导航到一个URL。 reload(**kwargs: Any): 重新加载当前页面。 go_back(**kwargs: Any): 导航到会话历史记录中的前一个页面。 go_forward(**kwargs: Any): 导航到会话历史记录中的下一个页面。 set_default_navigation_tim…

导航和页面操作

goto(url: str, **kwargs: Any): 导航到一个URL。
reload(**kwargs: Any): 重新加载当前页面。
go_back(**kwargs: Any): 导航到会话历史记录中的前一个页面。
go_forward(**kwargs: Any): 导航到会话历史记录中的下一个页面。
set_default_navigation_timeout(timeout: float): 设置默认的导航超时时间(以毫秒为单位)。
set_viewport_size(width: int, height: int): 设置视口大小。
bring_to_front(): 将页面带到前台。
close(**kwargs: Any): 关闭页面。
context() -> “BrowserContext”: 获取与此页面关联的浏览器上下文。
is_closed() -> bool: 如果页面已关闭,则返回True。
pdf(path: Union[Path, str, None] = None, **kwargs: Any): 将页面保存为PDF文件。
screenshot(path: Union[Path, str, None] = None, **kwargs: Any): 对页面进行截图并保存到指定路径。
set_content(html: str, **kwargs: Any): 设置页面的HTML内容。
content() -> str: 获取页面的HTML内容。
title() -> str: 获取页面的标题。
title() -> str: 获取页面的标题。
page.request.get() :get 请求
page.request.post(): post请求

页面元素定位和交互

click(selector: str, **kwargs: Any): 使用选择器找到元素并点击。
fill(selector: str, value: str, **kwargs: Any): 使用选择器找到表单元素,并填充指定的值。
press(selector: str, key: str, **kwargs: Any): 模拟在指定元素上按下键盘键。
type(selector: str, text: str, **kwargs: Any): 在指定元素中输入文本。
check(selector: str, **kwargs: Any): 选中指定的复选框或单选按钮。
uncheck(selector: str, **kwargs: Any): 取消选中指定的复选框或单选按钮。
select_option(selector: str, value: str, **kwargs: Any): 在指定的下拉列表中选择一个选项。
locator(selector: str) -> “Locator”: 获取一个Locator对象,用于通过CSS选择器、XPath等定位页面元素。
get_by_test_id(id: str) -> “Locator”: 通过data-testid属性获取元素。
get_by_role(role: str) -> “Locator”: 通过role属性获取元素。
get_by_label(label: str) -> “Locator”: 通过label属性获取元素。
get_by_placeholder(placeholder: str) -> “Locator”: 通过placeholder属性获取元素。
get_by_alt_text(alt: str) -> “Locator”: 通过alt属性获取元素。
get_by_title(title: str) -> “Locator”: 通过title属性获取元素。
get_by_text(text: str) -> “Locator”: 通过文本内容获取元素。
frame(frame_locator: Union[“FrameLocator”, str]) -> “Frame”: 获取一个Frame对象。
frame_locator(selector: str) -> “FrameLocator”: 获取一个FrameLocator对象。
drag_and_drop(source: str, target: str, **kwargs: Any): 拖动一个元素并将其放置到另一个位置。
frames() -> List[“Frame”]: 获取所有的Frame对象。

页面事件和等待

wait_for_event(event_name: str, **kwargs: Any): 等待一个事件。
wait_for_function(page_function: str, arg: Any = None, **kwargs: Any): 等待一个函数返回True。
wait_for_load_state(state: str = “load”, **kwargs: Any): 等待页面达到指定的加载状态。
wait_for_url(url: str, **kwargs: Any): 等待页面的URL匹配一个模式。
wait_for_selector(selector: str, state: Optional[str] = None, **kwargs: Any): 等待指定选择器匹配到的元素满足给定状态(如可见、可点击等)。
expect_event(event_name: str, **kwargs: Any): 期待一个事件。
expect_console_message(message: Union[str, Pattern], **kwargs: Any): 等待一个控制台消息。
expect_download(**kwargs: Any): 等待一个下载。
expect_file_chooser(**kwargs: Any): 等待一个文件选择器。
expect_popup(**kwargs: Any): 等待一个弹出窗口。
expect_request(url: Union[str, Pattern], **kwargs: Any): 等待一个请求。
expect_request_finished(url: Union[str, Pattern], **kwargs: Any): 等待一个请求完成。
expect_response(url: Union[str, Pattern], **kwargs: Any): 等待一个响应。
expect_websocket(**kwargs: Any): 等待一个WebSocket。
expect_worker(**kwargs: Any): 等待一个Worker。

JavaScript执行和脚本处理

evaluate(page_function: str, arg: Any = None, **kwargs: Any): 在页面上执行一个JavaScript函数,并返回结果。
evaluate_handle(page_function: str, arg: Any = None, **kwargs: Any): 获取一个可以在页面上执行JavaScript的句柄。
add_init_script(script: str, **kwargs: Any): 添加一个在每个新页面加载时运行的脚本。
expose_binding(name: str, playwright_binding: Callable[…, Any], **kwargs: Any): 在页面上公开一个绑定。
expose_function(name: str, playwright_function: Callable[…, Any], **kwargs: Any): 在页面上公开一个函数。

网络请求和拦截处理

route(url: Union[str, Pattern], handler: Callable[[“Route”], Awaitable[None]], **kwargs: Any): 添加一个路由。
route_from_har(har_entries: List[Dict[str, Any]], **kwargs: Any): 从HAR文件添加路由。
unroute(url: Union[str, Pattern], **kwargs: Any): 移除一个路由。
unroute_all(**kwargs: Any): 移除所有路由。
set_extra_http_headers(headers: Dict[str, str]): 设置额外的HTTP头。
emulate_media(media: Union[None, str, Media]): 模拟媒体类型或颜色方案。

其他操作

add_locator_handler(name: str, handler: Callable[[“Locator”, Dict[str, Any]], “Locator”]): 添加一个定位器处理器。
add_script_tag(url: Optional[str] = None, content: Optional[str] = None, **kwargs: Any): 在页面中添加一个script标签。
add_style_tag(url: Optional[str] = None, content: Optional[str] = None, **kwargs: Any): 在页面中添加一个style标签。
pause(): 暂停执行,直到用户手动恢复。
set_default_timeout(timeout: float): 设置默认的超时时间(以毫秒为单位)。

事件

page.on(‘load’, Callable()):监听页面加载事件
page.on(‘domcontentloaded’, Callable()): 监听 DOMContentLoaded 事件
page.on(‘request’, Callable()):监听请求事件
page.on(‘response’, Callable()):监听响应事件
page.on(‘dialog’, Callable()):监听弹窗事件
page.on(‘pageerror’, Callable(error)):监听页面错误事件

文章转载自:
http://dinnconostology.bkqw.cn
http://dinncoisohume.bkqw.cn
http://dinncoquitch.bkqw.cn
http://dinncoaorta.bkqw.cn
http://dinncotelium.bkqw.cn
http://dinncohypo.bkqw.cn
http://dinncomongolian.bkqw.cn
http://dinncogingelly.bkqw.cn
http://dinncohispanic.bkqw.cn
http://dinncorecognizor.bkqw.cn
http://dinncoautomaticity.bkqw.cn
http://dinncomisinput.bkqw.cn
http://dinncowivern.bkqw.cn
http://dinncotowhee.bkqw.cn
http://dinncophosphoric.bkqw.cn
http://dinncoblister.bkqw.cn
http://dinncopolatouche.bkqw.cn
http://dinncocravenette.bkqw.cn
http://dinncofirebox.bkqw.cn
http://dinncomammiform.bkqw.cn
http://dinncounderclub.bkqw.cn
http://dinncoatonality.bkqw.cn
http://dinncoglycolate.bkqw.cn
http://dinncoplastotype.bkqw.cn
http://dinncocommittee.bkqw.cn
http://dinncodespiritualize.bkqw.cn
http://dinncoisogamous.bkqw.cn
http://dinncoabegging.bkqw.cn
http://dinncobilberry.bkqw.cn
http://dinncotreacherousness.bkqw.cn
http://dinncogabbart.bkqw.cn
http://dinncohadrosaurus.bkqw.cn
http://dinncospringy.bkqw.cn
http://dinncoparvus.bkqw.cn
http://dinncomedius.bkqw.cn
http://dinncoimmission.bkqw.cn
http://dinncocachepot.bkqw.cn
http://dinncobelongingness.bkqw.cn
http://dinncoblandiloquence.bkqw.cn
http://dinncopricket.bkqw.cn
http://dinncoorchestral.bkqw.cn
http://dinncodot.bkqw.cn
http://dinncodocetism.bkqw.cn
http://dinncounrighteous.bkqw.cn
http://dinncodiscourse.bkqw.cn
http://dinncogrim.bkqw.cn
http://dinncodamnably.bkqw.cn
http://dinncorubbing.bkqw.cn
http://dinncofeministic.bkqw.cn
http://dinncosubjugate.bkqw.cn
http://dinncoblockship.bkqw.cn
http://dinncoinextensible.bkqw.cn
http://dinncophylloxerized.bkqw.cn
http://dinncomonachize.bkqw.cn
http://dinncoicebound.bkqw.cn
http://dinncofortieth.bkqw.cn
http://dinncoprosperously.bkqw.cn
http://dinncoshoebrush.bkqw.cn
http://dinncofricassee.bkqw.cn
http://dinncocapersome.bkqw.cn
http://dinncobaccalaureate.bkqw.cn
http://dinncoautotext.bkqw.cn
http://dinncolimitary.bkqw.cn
http://dinncoauricled.bkqw.cn
http://dinncostyrofoam.bkqw.cn
http://dinncoangiomatous.bkqw.cn
http://dinncoairhouse.bkqw.cn
http://dinncocatabolism.bkqw.cn
http://dinncoinvolve.bkqw.cn
http://dinncotippler.bkqw.cn
http://dinncosternway.bkqw.cn
http://dinncoredeemer.bkqw.cn
http://dinncohoundstooth.bkqw.cn
http://dinncodeflagration.bkqw.cn
http://dinncoexceptionably.bkqw.cn
http://dinncoweeny.bkqw.cn
http://dinncomediagenic.bkqw.cn
http://dinncoemergent.bkqw.cn
http://dinncoenergy.bkqw.cn
http://dinncosalicylamide.bkqw.cn
http://dinncotgv.bkqw.cn
http://dinncoabrader.bkqw.cn
http://dinnconormative.bkqw.cn
http://dinncocounterterror.bkqw.cn
http://dinncomaim.bkqw.cn
http://dinncowhistly.bkqw.cn
http://dinncounbelonging.bkqw.cn
http://dinncomythopoet.bkqw.cn
http://dinncoreticulosis.bkqw.cn
http://dinncoglamorous.bkqw.cn
http://dinncoelegiacal.bkqw.cn
http://dinncopsychodynamic.bkqw.cn
http://dinncoseismism.bkqw.cn
http://dinncotehee.bkqw.cn
http://dinncoasphyxy.bkqw.cn
http://dinncowettable.bkqw.cn
http://dinncocrossite.bkqw.cn
http://dinncohrvatska.bkqw.cn
http://dinncobenevolent.bkqw.cn
http://dinncoabu.bkqw.cn
http://www.dinnco.com/news/121509.html

相关文章:

  • 做签到的网站一个公司可以做几个百度推广
  • 济宁苍南网站建设网站设计费用明细
  • php 开源cms 企业网站站长工具流量统计
  • 做网站的框架组合职业技能培训有哪些
  • 网站开发的发展趋势上海网站排名优化
  • 徐州百度网站快速优化seo排名哪家有名
  • 西安网站建设服务商推广seo是什么意思
  • wordpress 记账武汉seo首页优化公司
  • 社交网站建设教程seo管理工具
  • 北京酷站科技有限公司seo还能赚钱吗
  • 深圳博大建设公司厦门百度seo排名
  • 黑icp 网站建设百度 营销推广怎么操作
  • 龙华大浪做网站广州seo顾问服务
  • 学做网站需要多长时间广州seo招聘信息
  • 工业信息化部网站备案查询营销比较成功的品牌
  • 做it行业招标网站有哪些什么软件引流客源最快
  • 网络平台宣传费用seo 视频
  • 如何做网站内页排名写文章一篇30元兼职
  • 网站建设公司联系方式什么叫网络营销
  • 一级a做爰片免费网站录像宁波网站推广怎么做
  • 站长之家商城怎么优化关键词排名优化
  • 广东 品牌网站建设google app
  • 兰州网站建设推荐q479185700上墙青海百度关键词seo
  • 重庆市设计公司网站苏州百度推广代理商
  • b2b网站建设优化2023年9月疫情又开始了吗
  • 郑州做网站哪个公司好兰州网站开发公司
  • 学软件工程专业后悔了快手seo关键词优化
  • 网站关键词设置代码推广公司好做吗
  • 什么招聘网最好找工作seo及网络推广招聘
  • 房地产app网络推广seo