Quickly build a complete Selenium framework

Today I will talk about how to build a complete selenium framework. When you learn this article, you can also say that you can automate selenium testing. 1. The structure of the new project is as follows: Note: the whole project is a package, except for the outermost folder. That is to say, there is a "init". Py file under ea ...

Posted on Mon, 18 May 2020 01:26:49 -0400 by toniknik1982

JS directly downloads pictures and videos instead of opening previews

The attachment list in a project usually needs to provide the function of downloading and deleting. The function itself has nothing to say. It is a basic function. The download function of the browser is also used in the way of window.open(url), or window.location.href=url. The url is the attachment Download interface. The browser automatically ...

Posted on Sat, 09 May 2020 11:47:18 -0400 by kid85

Go gRPC Advanced-gRPC Conversion HTTP

Preface We usually use RPC for internal communication and Restful Api for external communication.To avoid writing two sets of apps, we use grpc-gateway Convert gRPC to HTTP.When the service receives an HTTP request, the grpc-gateway converts it to gRPC for processing and then returns the data as JSON.This code builds on the previous one and ev ...

Posted on Tue, 05 May 2020 20:47:11 -0400 by mrwhale

JS html implementation full screen

First of all, according to the following warning information, it can be seen that the full screen function cannot be realized automatically, and it must be manually Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture. So to achieve full screen, you can click a button con ...

Posted on Sun, 03 May 2020 15:03:56 -0400 by tefflox

java web download file name garbled

Web Development Download File function (the code is as follows). If the file name is in Chinese, it often appears garbled phenomenon and needs to be encoded. String fileName = "Test documents.doc"; try { HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().get ...

Posted on Sat, 02 May 2020 16:06:23 -0400 by firemankurt

Tencent Daniel teaches you a simple automatic test model (Python+Selenium)

Today, I'm going to explain a simple automatic test model. For the students who have just come into contact with automatic test, because they don't have the basis of programming language, they can't understand the functions, encapsulation, package and other concepts in the code. They just understand the most basic terms such as string, array, ...

Posted on Wed, 29 Apr 2020 05:33:15 -0400 by jdh

Building of python+selenium automation framework

Environment and software information python 3 selenium 3.13.0 xlrd 1.1.0 chromedriver HTMLTestRunner explain: selenium/xlrd only needs to use the pip install name in python environment to install. After installation, you can use pip list to view your own installation list information. chrome driver: the version needs to correspond ...

Posted on Tue, 28 Apr 2020 23:59:53 -0400 by ltd

Remember the first complete automated test script

Recently, I have seen what a complete automation script looks like. This is a summary that I have learned and practiced once, and there are some imperfections. I hope you can give more advice. Our test case is: open the Baidu home page, search for Selenium, and then check the search list, there is no Selenium this official link option. Before ...

Posted on Sun, 26 Apr 2020 12:36:43 -0400 by Rommeo

Screen capture of Selenium ChromeDriver method of specifying elements

phantomjs is the representative of headless browser, which can cut the full screen image, which is very simple for markup elements; however, the latest Selenium version indicates that it is no longer supported, so it can only use other agents; chrome, Firefox, etc. have just launched headless mode, here we use ChromeDriver as a demonstration ...

Posted on Sun, 26 Apr 2020 11:04:22 -0400 by jplock

The implementation of creating directory (multi-level directory) in blog Garden

Recently, many of the partners who read the articles written by mark down have created a directory in the sidebar, so Baidu searched and planned to add a directory. But Baidu's search results are almost the same. They are basically produced by the big guy "lone, arrogant and Wolf", and then they try to add them to their blog. However ...

Posted on Mon, 20 Apr 2020 10:42:15 -0400 by darklight