kamalakar vadla
-
2008-12-23
- priority: 5 --> 9
I have written one custom command in project specific .java file . My problem is Junit is not counting the error that are occuring in the custom commands refer following code..
public void registration(String id,String pwd) {
try\{
type\("emailID", id\);
type\("password", pwd\);
type\("cPassword", pwd\);
select\("userType", "label=STUDENT"\);
click\("//input\[@type='image'\]"\);
waitForPageToLoad\("30000"\);
if\(isTextPresent\("Registration Successful\!"\)\)\{
System.out.println\("text is present"\);
\}else\{
System.out.println\("\*\*\*\*\*\*\*\*\*\*\*text not present\*\*\*\*\*\*\*\*\*\*\*"\);
\}
\}catch\(Exception e\)\{\}
\}
in the above code suppose if "Registration Successful!" is not present then registration command should show as fail in the excel report but in the excel report it is showing as pass . This is a bug ? Can you please help me how can i get rid of this .,.?