You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -80,17 +87,26 @@ When using the `codegen` tool, it is recommended to do the following:
80
87
- Pass in a starting URL where possible to set the window at your starting location (e.g. `playwright codegen https://github.com/nhs-england-tools/playwright-python-blueprint`)
81
88
- When using the Playwright Inspector window, set the target value to Pytest as it'll automatically format any generated tests into the pytest format we recommend using in this blueprint
82
89
83
-
The `codegen` tool is particularly powerful, as it also allows you to consider assertions on the page you are hoping to test.
90
+
The `codegen` tool is particularly powerful, as it also allows you to consider assertions on the page you are hoping to test. Currently, you can do the following
91
+
basic assertions using the `codegen` tool:
84
92
85
-
*** TODO - Talk about assertion management
93
+
- Assert visibility of an element on the page
94
+
- Assert specific text is present within an element on the page
95
+
- Assert an element on the page has a specific value
96
+
97
+
These are accessible via the floating menu when using the `codegen` tool, as highlighted in green here:
98
+
99
+
<!-- vale off -->
100
+

101
+
<!-- vale on -->
86
102
87
103
Whilst the `codegen` tool will provide you with the basic code to get started, it's recommended that once you've got a working test, you consider refactoring any
88
104
code that has been provided and refine as needed. Having the ability to generate the code in this fashion allows you to create tests quickly and build up
89
105
understanding of how to construct tests using Playwright Python, but you will soon discover that they may not be the most efficient in their raw state!
90
106
91
107
## Appendix
92
108
93
-
### Info: What is Chromium
109
+
### Info: What Is Chromium
94
110
95
111
[Chromium](https://www.chromium.org/Home/) is one of the open source browser that comes bundled with Playwright on install (if using the instructions
96
112
within the [README](../../README.md) of this blueprint) but also more importantly, serves as the base code for both Google Chrome and Microsoft Edge.
0 commit comments