In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Recently, I was writing an automation script for the page. When I located the frame in frameset, I couldn't locate it. After trying again and again, I finally solved it. I am very gratified. O (∩ _ ∩) O ~
The page structure is as follows:
The problems are as follows: after I successfully logged in, in order to determine the user name, first from the default state driver.switch_to_frame ("topFrame"), but then locate the left menu bar, the element can not be located, by looking at the structure, it turned out to be in another frame (leftFrame), but at this time through driver.switch_to_frame ("leftFrame"), the prompt can not find frame, from the Internet to find the solution Some people say that it is best not to use the driver.switch_to_frame () method, but to use the driver.swich_to (). Frame () method instead, but try it and report the has no _ _ called () _ method, and finally find a way to say: you need to driver.switch_to_defaultContent () first, and then driver.switch_to_fram () to the needed frame, even after you try it.
Solution: first driver.find_element_by_id ("frame") to the frameset of the same level under topFrame, then left_frame = frameset.find_element_by_name ("leftFrame"), and finally driver.switch_to_frame (left_frame).
Summary: the specific method to use, mainly depends on the page structure, different structures use different methods, Wakaka (∩ _ ∩) O ~
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.