当前位置:网站首页>UI automated interview questions

UI automated interview questions

2022-06-11 20:28:00 Youwanyong

1、 Automated processes

Before writing test cases , The team will discuss the project system , Make an assessment , Whether it can be automated , Those that can be automated , Usually smoke test cases are converted into automated scripts .

The test framework used is python Of selenium+unittest modular , For any function , We will build a test project first , Use testcase To store test cases , Use report To store test reports , At the same time, some common data and modules are placed in public in , Open a browser , Connect to database, etc , After debugging the script locally , We can use jenkins To periodically upload to git The script in the .

2、 Common element positioning methods are ?

ID、Name、class Name、link Text、tag Name、partial Link text、xpath、css selector

3、 Reasons for inaccurate element positioning ?

Page element not loaded ;

Element attribute values are dynamic ;

Element attribute values are not unique ;

Involves another (iframe) frame , Need to switch

Need elements on another page , Need to switch windows .

3、 How to locate element attribute values is dynamic ?

We can choose the unique of this element , It is not a dynamic attribute value to locate , Or use xpath、css To perform hierarchy + Attribute

4、 How to check the execution results of automated scripts ?

Use assertEqual() perhaps assertIn() To add assertions

5、 How to determine whether it is a script problem or a version problem ?

. Indicates that the use case passes ;

E Indicates a script error ;

F Indicates that the assertion failed ;

6、 How to improve selenium Execution speed of ;

Increase network speed

To use less sleep wait for , Use both explicit and implicit waiting ;

7、 Use that method to determine whether the element is displayed ?

is_displayed() Show

8、css and xpath The difference between ?

The grammar is different ;

css Relatively fast ;

9、 The reason why the automation script failed ?

1、 The test environment is unstable ;

2、 The developer modifies the code without notifying the tester ;

3、 Development introduces new problems ;

原网站

版权声明
本文为[Youwanyong]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203011747013581.html