The first chapter python + selenium test automation combat

@ Introduction

Automated testing is one of the main direction of software testing;

Tutorials from the fundamental needs tests, explain how to display their automated testing.

First, we need to understand that automation is only a tool to meet some of our needs; there is no need to spend time to make sense of it all; we just need to learn some of its features, and then let it work for us; that's it.

python + selenium deployment environment

Official address: https: //www.python.org/

 

 

 This is the latest version of the installation package.

There python2.x and python3.x of great distinction, there are many different syntax; but the difference between the python3.x is not great; recommend using the latest version of learning.

start installation

 

install now silent installation to the C drive directory.

customize installation can set a custom installation, the installation to another disk.

Add Python3.8 to PATH environment variable is set to join, the proposed check. (After adding the direct command can be written into the python page)

 

Here choose a custom installation.

Click next to continue

 

 

 

 

 

 

Here you can choose to install to the specified disk.

 

 

 That success appeared successful, click Close to close.

 

 

 Then we test whether the installation was successful, enter the DOS page, you can jump directly into python to edit the page (this is because checked before adding environment variables have this feature)

 

 

 It can be seen displayed version before installing version 3.8.0

The old routine, to try hello word!

 

 

 You can print hello word correctly! , It shows that our python interpreter installed successfully.

pychram IDE installation environment

python interpreter can also write code, but is not suitable for new users; so we need to write code IDE environment (also written many programmers use IDE project, management code)

Official address: http: //www.jetbrains.com/pycharm/

 

Click to download direct download.

Select Community Edition enough for us to use.

Downloaded directly installed.

 

 

 Click next Next.

 

 

 Here you can choose to install to the specified directory.

I chose the E drive.

 

 

 Select the custom settings.

Then proceed next

 

 

 After successful installation, you can be found in the desktop shortcut to open.

 

 IDE环境已经安装好了,我们来打开看一下。

 

 

 

 新建一个项目,路径最好记住,因为后续导入第三方模块很有用。

 

 

 成功打开了,左边的是新建项目以及一些配置。

 

 

 我喜欢黑色的环境,可以在settings→appearance→theme选择不同的背景环境。

 

 点击apply查看一下效果

我们先来建一个文件夹,在在文件夹下面放py文件

 

 

 如图,上面是菜单栏,左边是项目,中间是写代码的地方,下面是输出;很多IDE集成软件都是这样设定的;适应就好了。

到这里,我们把环境都搭建好了。

 

温馨提示:按照这个教程可以正常安装成功,但是;可能各种电脑设备,或者之前就有安装过旧版本python影响,一些设备极有可能在安装过程出现各种问题,如丢失一些组件;如果出现失败情况,可以自行百度寻找问题;自己找出问题并解决问题也可以达到提升自己的效果。

 

 

Guess you like

Origin www.cnblogs.com/daodexuke/p/11786025.html