当前位置:网站首页>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 >')

边栏推荐
- Recovering the system with Clonezilla USB disk
- STM32 project design: temperature, humidity and air quality alarm, sharing source code and PCB
- Discrete device ~ diode triode
- Relationship extraction --r-bert
- 1.Intro_ Math (white board derivation and reprint of station B)
- Apple motherboard decoding chip, lightning Apple motherboard decoding I.C
- Whale conference provides digital upgrade scheme for the event site
- Discrete device ~ resistance capacitance
- 51 MCU project design: Based on 51 MCU clock perpetual calendar
- [unity mirror] use of networkteam
猜你喜欢

Exploration of webots and ROS joint simulation (II): model import

2020-10-20
![[unity mirror] use of networkteam](/img/b8/93f55d11ea4ce2c86df01a9b03b7e7.png)
[unity mirror] use of networkteam

多台三菱PLC如何实现无线以太网高速通讯?

Compiling owncloud client on win10

WBC learning notes (I): manually push WBC formula

利用无线技术实现分散传感器信号远程集中控制

Digital image processing learning (II): Gaussian low pass filter

Remote centralized control of distributed sensor signals using wireless technology

Discrete device ~ resistance capacitance
随机推荐
Opencv learning notes 3
Object extraction_ nanyangjx
自动化测试中,三种常用的等待方式,强制式(sleep) 、 隐式 ( implicitly_wait ) 、显式(expected_conditions)
框架跳转导致定位失败的解决方法
Analysis of Yolo series principle
Batch execute SQL file
9. code generation
软件工程-个人作业-提问回顾与个人总结
51 single chip microcomputer project design: schematic diagram of timed pet feeding system (LCD 1602, timed alarm clock, key timing) Protues, KEIL, DXP
多台三菱PLC如何实现无线以太网高速通讯?
WBC learning notes (II): practical application of WBC control
Two ways to realize time format printing
Jupyter的安装
Apple motherboard decoding chip, lightning Apple motherboard decoding I.C
Esp8266wifi module tutorial: punctual atom atk-esp8266 for network communication, single chip microcomputer and computer, single chip microcomputer and mobile phone to send data
Embedded Software Engineer (6-15k) written examination interview experience sharing (fresh graduates)
Leetcode22 summary of types of questions brushing in 2002 (XII) and collection search
ROS learning notes (6) -- function package encapsulated into Library and called
QT_ AI
Intra class data member initialization of static const and static constexpr