@@ -4,8 +4,8 @@ const { expect } = require("@playwright/test");
44
55test ( "BstackDemo Add to cart" , async ( { page } , testInfo ) => {
66 try {
7- await page . evaluate ( ( _ ) => { } ,
8- `browserstack_executor: ${ JSON . stringify ( { action : "setSessionName" , arguments : { name : testInfo . project . name } } ) } ` ) ;
7+ await page . evaluate ( ( _ ) => { } ,
8+ `browserstack_executor: ${ JSON . stringify ( { action : "setSessionName" , arguments : { name : testInfo . project . name } } ) } ` ) ;
99 await page . waitForTimeout ( 5000 ) ;
1010
1111 await page . goto ( "https://www.bstackdemo.com/" , {
@@ -15,7 +15,7 @@ test("BstackDemo Add to cart", async ({ page }, testInfo) => {
1515 await page . getByText ( "Checkout" ) . click ( ) ;
1616 await page . locator ( "#username svg" ) . click ( ) ;
1717 await page . locator ( "#react-select-2-option-0-0" ) . click ( { force : true } ) ;
18- await page . locator ( "#password svg" ) . click ( ) ;
18+ await page . locator ( "#password svg" ) . click ( { force : true } ) ;
1919 await page . locator ( "#react-select-3-option-0-0" ) . click ( { force : true } ) ;
2020 await page . getByRole ( "button" , { name : "Log In" } ) . click ( ) ;
2121 await page . getByLabel ( "First Name" ) . click ( ) ;
@@ -31,11 +31,11 @@ test("BstackDemo Add to cart", async ({ page }, testInfo) => {
3131 await page . getByRole ( "button" , { name : "Submit" } ) . click ( ) ;
3232 await page . getByRole ( "button" , { name : "Continue Shopping »" } ) . click ( ) ;
3333
34- await page . evaluate ( ( _ ) => { } ,
35- `browserstack_executor: ${ JSON . stringify ( { action : "setSessionStatus" , arguments : { status : "passed" , reason : "Product added to cart" } } ) } ` ) ;
34+ await page . evaluate ( ( _ ) => { } ,
35+ `browserstack_executor: ${ JSON . stringify ( { action : "setSessionStatus" , arguments : { status : "passed" , reason : "Product added to cart" } } ) } ` ) ;
3636 } catch ( e ) {
3737 console . log ( e ) ;
38- await page . evaluate ( ( _ ) => { } ,
39- `browserstack_executor: ${ JSON . stringify ( { action : "setSessionStatus" , arguments : { status : "failed" , reason : "Test failed" } } ) } ` ) ;
38+ await page . evaluate ( ( _ ) => { } ,
39+ `browserstack_executor: ${ JSON . stringify ( { action : "setSessionStatus" , arguments : { status : "failed" , reason : "Test failed" } } ) } ` ) ;
4040 }
4141} ) ;
0 commit comments