web automation:
1. Test Case (steps, familiar with requirements documents, web research project first hand, preconditions, expected results)
Interface automated test data as the most suitable data driver, the data on the need to operate in excel excel
Why web automated testing can not fully use data-driven?
web page is not the same step, and the interface is completely not care steps clarify ideas
2. Automated Test Test typical:
- A single logic
- Business stability
- Non-interactive multi-terminal, multi-terminal interaction involving multiple subsystems that are not suitable for web automated testing
3. Start with handwritten code
To test the business logic and logical separation
Test code:
- Foundation Class: DoExcel class, middle layer: qcdDoExcel (DoExcel), call time easier
Stratified:
- Using the function package
- Classes and Objects
- POM (the interview will be asked)
PageObject: page object model, in essence, is the logical separation test page logic and benefits of scalability and reusability of code readability and maintainability
PageObjectModel
- locator
- Data packets: data-driven, data-driven model wants to achieve in the web, the simplest is a data packet
- basepage
ddt essentially guarantee a separate test, a test to dynamically generate test_bid_error_01 test_bid_error_02
So ddt automatically create test cases n
When excel management, more form
Can not be positioned in the native app css, since there is not a native app html
Select 封装:def get_option(element, id)
Method waiting condition occurs if the display is not specified, can be custom implementation
Wait for the display principle: look at the source code
selenium page may be modified by encapsulation js