当前位置:网站首页>Selenium, element operation and browser operation methods
Selenium, element operation and browser operation methods
2022-07-02 13:47:00 【Acrobat】
One 、 Element operation
Click on the action : Elements .click()
Input operation : Elements .send_key()
Clear operation : Elements .clear()
for example :
Two 、 Browser operation
Common methods :
maximize_window()---- Maximize browser
set_window_size(width,height)---- Sets the size of the browser window , wide 、 Height is pixel .
set_window_position(x,y)---- Set the position of the display where the upper left corner of the browser window is located ( The position of the pixel )
back()---- back off , Equivalent to the back button in the browser
forward()---- Forward , Equivalent to the forward button in the browser
close()---- Close the current tab of the browser ( Instead of closing the entire browser )
quit()---- Close the entire browser
title---- Get the browser's title( The content displayed at the top of the browser tab )
current---- Get browser url Address
3、 ... and 、 Get element information
Common methods :
size---- Returns the element size
text---- Return the text content of the element
get_attribute("abd")---- Get attribute value ,abc Is the name of the property
is_displayed()---- Determines whether an element is visible
is_enabled()---- Determine whether the element is available
is_selected()---- Determine whether the element is selected , Mainly used in similar check boxes 、 On the radio button
边栏推荐
- Explanation: here is your UFO, Goldbach conjecture
- 混沌工程平台 ChaosBlade-Box 新版重磅发布
- 量子三体问题: Landau Fall
- 伙伴云表格强势升级!Pro版,更非凡!
- 验证失败,请检查您的回电网址。您可以按照指导进行操作
- ArrayList and LinkedList
- On flow delivery between microservices
- Runhe hi3516 development board openharmony small system and standard system burning
- mysql ---- Oracle中的rownum转换成MySQL
- [Blue Bridge Cup] children's worship circle
猜你喜欢
MAC (MacOS Monterey 12.2 M1) personal use PHP development
OpenAPI generator: simplify the restful API development process
Web Foundation
Node. JS accessing PostgreSQL database through ODBC
selenium 在pycharm中安装selenium
Origin绘制热重TG和微分热重DTG曲线
Integral link, inertia link and proportion link in Simulink
Solution: Compression Technology (original version and sequel version)
Essential for operation and maintenance - Elk log analysis system
Node.js通过ODBC访问PostgreSQL数据库
随机推荐
【蓝桥杯选拔赛真题43】Scratch航天飞行 少儿编程scratch蓝桥杯选拔赛真题讲解
de4000h存储安装配置
Error function ERF
What are eNB, EPC and PGW?
Why is the default of switch followed by break?
[usaco05jan]watchcow s (Euler loop)
Clean up system cache and free memory under Linux
【OpenGL】笔记二十九、高级光照(镜面高光)
Unity small map production [2]
Essential for operation and maintenance - Elk log analysis system
Dingtalk send message
Explanation of 34 common terms on the Internet
JS逆向之行行查data解密
Pointer from entry to advanced (1)
Chaos engineering platform chaosblade box new heavy release
Numpy array calculation
How much do you know about free SSL certificates? The difference between free SSL certificate and charged SSL certificate
Detailed collection of common MySQL commands
Stone merging Board [interval DP] (ordinary stone Merging & Ring Stone merging)
错误:EACCES:权限被拒绝,访问“/usr/lib/node_modules”