File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
testng/src/test/java/com/example Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,7 @@ public class SimpleTest {
2323 public void setUp () throws Exception {
2424 try {
2525 System .out .println ("Setting up Chrome options..." );
26-
27- // Try a simpler approach first - just basic capabilities
26+
2827 DesiredCapabilities caps = new DesiredCapabilities ();
2928 caps .setBrowserName ("chrome" );
3029
@@ -125,8 +124,8 @@ public void testCheckoutFlowBStackDemo() {
125124
126125 // Checkout
127126 driver .findElement (By .id ("checkout-shipping-continue" )).click ();
128- driver .findElement (By .xpath ( "//*[text()='Continue'] " )).click ();
129- driver . findElement ( By . xpath ( "//*[text()='Orders']" )). click ( );
127+ String checkoutMessage = driver .findElement (By .id ( "confirmation-message " )).getText ();
128+ Assert . assertEquals ( checkoutMessage , "Your Order has been successfully placed." );
130129
131130 System .out .println ("Test passed: Checkout flow works!" );
132131 }
You can’t perform that action at this time.
0 commit comments