Thanks for sharing valuable info.QQ Under formPage.ts ;if line 4 is replaced with public static fname = '#firstname'; then line 16 await this.page.locator(Form.firstname).type(fname); My current real-time (POM)project looks like the above. Is this also considered a proper coding standard? Your input is highly appreciated.
Thanks for asking . You can use it. However, Use static variables when you want to share data or configuration across all instances of a class. Use instance variables (accessed via this) when you need to store and access data that is specific to each instance of an object. Better use "this", as it will be individual instance, so that you can change ( in specific test and will not impact other test ) or use in parallel testing.
awesome content, nice and easy with the screenshot and video options in the config file. One question: in the case of a major project with hundreds of tests, will those features (screenshot and video capture) hinder the test run speed?