Consider this scenario, we have a table which gives us the value of a particular product in the first row and the total product value in the last row. Incase we buy just a single product, then the first row value and the last row value remains the same. In this case let us consider you are getting the value of a HtmlText like this,
String value = BrowserWindow.HTMLTextNameProductName.getText()
String total = BrowserWindow.HTMLTextNameTotalValue.getText()
Total = 10 and Value = 10 since we just bought a single product. Now when we run the testcase, we are sure to get a window not unique error since we have the same values in the particular table. One simple way to bypass this write this simple statement
Agent.SetOption(OPT_VERIFY_UNIQUE,false)
This makes the unique option set to false.
Leave a Reply