1. whats wrong in your code i dont know. Once i get the code . i can tell
you
2. Assertion:
*Groovy code:*
We have to declare getMsessage() at the starting of the Method. *
Tabletxt* is the ui object in the Groovy.
public String getMsessage() {
String str = getText("*Tabletxt*")
return str
}
* Java code:*
@Test
public void testCase()
{
String str = obj.getMsessage();
assertNotNull(str);
assertTrue(str.contains("*Assertion Message*"));
}
Regards,
Hari
On 2 August 2011 11:22, QA_new <[email protected]> wrote:
> Hi all
>
> How to write the groovy for the Assert and Dropdown field.
>
> 1. I have a page where i have to select "Country" and on recording the
> script in trump its code is as follows:
>
> TextBox(uid: "76", clocator: [tag: "option", text: "India", value:
> "76"])
>
> and i wrote it this way:
>
> selectByLabel "Section.76", 'India'
>
> but still its not working.
>
> 2. For finding the text on the page i used the assert command like
> this way:
> assertTrue(obj.getTitle().contains(Supplier_Update));
>
> but if i have to search the text for the custom messages like
> "Supplier updated" what is the way to write the assert command for
> this.
>
> Please share your knowledge if someone have any suggestion.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "tellurium-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/tellurium-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"tellurium-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en.