当前位置:网站首页>The solution of positioning failure caused by framework jump
The solution of positioning failure caused by framework jump
2022-06-26 08:51:00 【Feng Dashao】
Believe that most of Selenium Beginners will encounter inexplicable positioning element An error is reported if it cannot be found , In fact, in addition to human carelessness to write wrong grammar 、 Property value 、 Or you haven't waited for the location you need element After the page is loaded , The main reason is the problem of frame jump and hyperlink jump .
Multi window conversion of hyperlink jump , I won't repeat it here , See the test article of my previous blog for details . Here's the picture , After login , for example “ Corporate website ” Of “ To manage ” This hyperlinked label, Is in iframe In this frame , So before positioning , You must jump to this frame first . Because this website is used for all hyperlinks js To hide to achieve the purpose of anti climbing , So after we locate the click , Will automatically open a new tab , Then convert through the window , You can crawl the corresponding URL .
In automated testing , In addition to mastering positioning , You also need to master the passing of the front end js Yes Various element attribution value Of increase 、 Delete 、 Change method . For related methods, please refer to my previous blog .
browser.switch_to_frame('mainFrame')
link = browser.find_element_by_link_text(' To manage >')

边栏推荐
- SQL learning experience (II): question brushing record
- The principle and function of focus
- Drawing with MATLAB (1)
- Segmentation of structured light images using segmentation network
- Selenium 搭建 Cookies池 绕过验证反爬登录
- STM32 porting mpu6050/9250 DMP official library (motion_driver_6.12) modifying and porting DMP simple tutorial
- Software engineering - personal assignment - question review and personal summary
- What is Qi certification Qi certification process
- Record the problem yaml file contains Chinese message 'GBK' error
- Matlab drawing checkerboard (camera calibration)
猜你喜欢

Discrete device ~ resistance capacitance

Esp8266wifi module tutorial: punctual atom atk-esp8266 for network communication, single chip microcomputer and computer, single chip microcomputer and mobile phone to send data

WBC learning notes (I): manually push WBC formula

Koa_ mySQL_ Integration of TS

Nebula diagram_ Object detection and measurement_ nanyangjx

Convex optimization of quadruped

Matlab drawing checkerboard (camera calibration)

2020-10-29

Degree of freedom analysis_ nanyangjx
![[unity mirror] use of networkteam](/img/b8/93f55d11ea4ce2c86df01a9b03b7e7.png)
[unity mirror] use of networkteam
随机推荐
Segmentation of structured light images using segmentation network
ZLMediaKit推流拉流测试
Comparison between Apple Wireless charging scheme and 5W wireless charging scheme
Intra class data member initialization of static const and static constexpr
自动化测试中,三种常用的等待方式,强制式(sleep) 、 隐式 ( implicitly_wait ) 、显式(expected_conditions)
Esp8266wifi module tutorial: punctual atom atk-esp8266 for network communication, single chip microcomputer and computer, single chip microcomputer and mobile phone to send data
Summary of common instructions for arm assembly
关于极客时间 | MySQL实战45讲的部分总结
STM32 encountered problems using encoder module (library function version)
Relationship extraction -- casrel
Fabrication of modulation and demodulation circuit
FFmpeg音视频播放器实现
Remote centralized control of distributed sensor signals using wireless technology
2020-10-17
Koa_mySQL_Ts 的整合
Koa_ mySQL_ Integration of TS
STM32 project design: temperature, humidity and air quality alarm, sharing source code and PCB
Use of PCL
Interpretation of x-vlm multimodal model
Application of wireless charging receiving chip xs016 coffee mixing cup