In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
1. In the actual testing process, it is often necessary to compare whether the actual results are consistent with the expected results.
two。 If the actual result is inconsistent with the expected result, it is considered as bug.
Selenium is widely used in Bhand S architecture, how to verify the correctness of test results through selenium.
Case study: take Baidu as an example to see how to verify the correctness of the test results. After clicking "hao123" on the home page of Baidu, jump to the "hao123" page to verify: whether to jump to the "hao123" page how to achieve this scenario through selenium? # * # obtain verification information, and after manipulating a page Confirm that you entered the expected result # * from selenium import webdriverfrom time import sleepdriver = webdriver.Firefox () driver.get ("http://www.baidu.com")print("===========The baidu Page=") First_Title = driver.titleprint ("The first page title is:%s"% First_Title) print ("= The hao123 Page=") driver.find_element_by_xpath ("/ a [@ name='tj_trhao123'") ] "). Click () Second_Title = driver.titleprint (" The Second page title is:%s "% Second_Title) Expect_Title =" hao123_ access starts here "if Second_Title = = Expect_Title: print (True) else: print (False) driver.quit () selenium checks the title of the page through driver.title Determine whether the title value of the actual page is the same as the expected value; thus get the test results. If you want to learn selenium systematically, you can do it in such a way.
To promote my blog column, I have selected a topic "learn from Zero Selenium Automated Test Framework". Please add a link description. Let's start with the code and implement the Web automated testing framework step by step.
This project will build an available automated testing framework (based on python+selenium) from scratch.
Premise: you should master the basics of python and selenium. Or you won't understand.
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.