0

Flag Yes only should be run. Else part won't execute but if the condition is failed, else is getting passed.

if(data.get(Flag).equals("Yes}) && data.get(TC_Name).equals("TC_Name")){

......

}else{
 .....
}
3
  • Is this statement correct? - if(data.get(Flag).equals("Yes") && data.get(TC_Name).equals("Login")) - you have to use double quotes instead of }. Commented Nov 30, 2022 at 9:12
  • Your condition is composite. Make sure you have expected result after &&. Use debugging capabilities of your IDE. Commented Nov 30, 2022 at 11:06
  • if(data.get(Flag).equals("Yes") && data.get(TC_Name).equals("Login")) These are Matching Strings, Getting data from excel which are all Flag Yes with Testcase name will execute the script Commented Nov 30, 2022 at 13:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.