当前位置:网站首页>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
边栏推荐
- 诚邀青年创作者,一起在元宇宙里与投资人、创业者交流人生如何做选择……...
- On flow delivery between microservices
- How to explain binary search to my sister? This is really difficult, fan!
- 研究表明“气味相投”更易成为朋友
- OpenFOAM:lduMatrix&lduAddressing
- Chaos engineering platform chaosblade box new heavy release
- Numpy array calculation
- 2022 zero code / low code development white paper [produced by partner cloud] with download
- The second anniversary of the three winged bird: the wings are getting richer and the take-off is just around the corner
- uniapp小程序 subPackages分包配置
猜你喜欢

de4000h存储安装配置

Drawing Nyquist diagram with MATLAB

A better database client management tool than Navicat

Origin绘制热重TG和微分热重DTG曲线

How to modify the error of easydss on demand service sharing time?

Qt-制作一个简单的计算器-实现四则运算

代码实现MNLM

Partner cloud form strong upgrade! Pro version, more extraordinary!

selenium 在pycharm中安装selenium

I did it with two lines of code. As a result, my sister had a more ingenious way
随机推荐
Quantum three body problem: Landau fall
Unity small map production [2]
What are the classifications of SSL certificates? How to choose the appropriate SSL certificate?
【模板】最长公共子序列 (【DP or 贪心】板子)
[template] longest common subsequence ([DP or greedy] board)
[OpenGL] notes 29. Advanced lighting (specular highlights)
The second anniversary of the three winged bird: the wings are getting richer and the take-off is just around the corner
解答:EasyDSS视频点播时音频是否可以设置为默认开启?
P1347 排序(拓扑 + spfa判断环 or 拓扑[内判断环])
为什么switch 的default后面要跟break?
The xftp connection Haikang camera reported an error: the SFTP subsystem application has been rejected. Please ensure that the SFTP subsystem settings of the SSH connection are valid
MySQL -- convert rownum in Oracle to MySQL
Drawing Nyquist diagram with MATLAB
[true topic of the Blue Bridge Cup trials 43] scratch space flight children's programming explanation of the true topic of the Blue Bridge Cup trials
OpenFOAM:lduMatrix&lduAddressing
Explanation of 34 common terms on the Internet
代码实现MNLM
Integral link, inertia link and proportion link in Simulink
Astro learning notes
Web Foundation