Trump is not working for correctly

2 views
Skip to first unread message

satyadev

unread,
Aug 14, 2009, 3:19:31 AM8/14/09
to tellurium-users
Hi All,

I am facing lot of trouble with TrUmp for defining object map. I am
not able to customize properties. UI operations are not consistly
updating UI element in customizer pane.


Eample URL : http://www.citrix.com/English/ss/downloads/index.asp

Start Recording using trump IDE.
learn UI elements like Login/MyCtirix/downlaods/Product&solutions/
username/Password/login

we got follwing UI object code.

Container(uid: "root", clocator: [tag: "div", id: "container"]){
Container(uid: "T4d", clocator: [tag: "div", id: "header"]){
Container(uid: "TopLeftmenu", clocator: [tag: "div", direct: "true",
id: "supnav"]){
UrlLink(uid: "a0", clocator: [tag: "a", text: "My Citrix", href: "/
English/mycitrix/index.asp?ntref=util"])
UrlLink(uid: "a1", clocator: [tag: "a", text: "Log in", href: "/
English/mycitrix/index.asp"])
}
Container(uid: "T4dd", clocator: [tag: "div", direct: "true", class:
"qmmc", id: "qm0"]){
UrlLink(uid: "a2", clocator: [tag: "a", text: "Products &
Solutions", href: "/English/ps2/products/product.asp?
contentID=683711", class: "qmparent qmactive"])
UrlLink(uid: "a3", clocator: [tag: "a", text: "Downloads", href: "/
English/ss/downloads/index.asp"])
}
}
Form(uid: "T4dddddd", clocator: [tag: "form", id: "MiniLogin", name:
"LOGIN", action: "https://www.citrix.com/English/myCitrix/
doLogin.asp", method: "post"]){
InputBox(uid: "input4", clocator: [tag: "input", type: "text",
class: "formelement", id: "userid", name: "userid"])
InputBox(uid: "input5", clocator: [tag: "input", type: "password",
class: "formelement", id: "password", name: "password"])
InputBox(uid: "input6", clocator: [tag: "input", type: "image",
value: "1", name: "loginbtn", src: "/site/resources/v4_includes/
login_btn.gif"])
}
}

Now Click on Genrate and Customize

Select Login url Link item observe that add one extra attribute like
header it won't reflect in UI element.

I am trapped here all my UI elements stop respond customization.

Can Anybody help me to over come above situation.

regards,
Satyadev

Jian Fang

unread,
Aug 14, 2009, 10:23:37 AM8/14/09
to telluri...@googlegroups.com
Satyadev,

We will look into the problems by using the web site you provided and let you know
what we find.

Thanks,

Jian

Vivek

unread,
Aug 14, 2009, 10:32:23 AM8/14/09
to tellurium-users
I dont need to put everything in one module. Try splitting them into
separates UI modules like
module1
My Citrix/Log in
module 2
Products & Solutions
module 3
Username, Password, Log in

Record for the first module then click Generate and Customize. Clear
the recorded elements and then record for the second module...
Generate and Customize

You can put three modules in the defineUI method... see if this will
solve the problem...



Thanks,
Vivek

satyadev

unread,
Aug 18, 2009, 8:42:26 AM8/18/09
to tellurium-users
Hi Vivek,

Even though header task property is not able to customize. However
separating module reduced no of cross marks but not eliminated real
issue.

regards,
Satyadev

satyadev

unread,
Aug 18, 2009, 8:45:28 AM8/18/09
to tellurium-users
Hi,

can Any one provide best practices for UI modules maintenance?
site Demo show's only part of one frame example. things will be
difficult once real website with lot frames and containers.

regards,
Satyadev



On Aug 14, 7:32 pm, Vivek <vivekmong...@gmail.com> wrote:

satyadev

unread,
Aug 18, 2009, 9:30:42 AM8/18/09
to tellurium-users
Hi Vivek,

How exactly we can integrate each module. I did in following way.

public class CitrixHomePageUI extends DslContext{

public void defineUi() {
// Citrix home page Top Menus
ui.Container(uid: "CitrixHomePage", clocator: [tag: "div", id:
"supnav"])
{
UrlLink(uid: "LoginLink", clocator: [tag: "a", text: "Log in",
header: "/default:span[@id='unav_login']", href: "/English/mycitrix/
index.asp"])
Container(uid: "TopMenu", clocator: [tag: "div", class: "qmmc",
id: "qm1"]){
UrlLink(uid: "MyCitrixLink", clocator: [tag: "a", text: "My
Citrix", position: "7", direct: "true", href: "/English/mycitrix/
index.asp?ntref=hp_util_US"])
UrlLink(uid: "GlobalSitesLink", clocator: [tag: "a", text:
"Global Sites", position: "6", direct: "true", href: "/global"])
}
UrlLink(uid: "LogOutLink", clocator: [tag: "a", text: "Log Out",
href: "/English/mycitrix/logout.asp"])
}
// Citrix home Page Section
ui.Container(uid: "CitrixSection", clocator: [tag: "div", id:
"container"])
{
Container(uid: "TopMenu", clocator: [tag: "div", class: "qmmc",
id: "qm0"])
{
UrlLink(uid: "ProductsandSolutionsLink", clocator: [tag: "a",
text: "Products & Solutions", position: "1", href: "/English/ps2/
products/product.asp?contentID=683711&ntref=hp_nav_US"])
}
TextBox(uid: "FlashPromotion", clocator: [tag: "embed", type:
"application/x-shockwave-flash", name: "flashpromo", id: "flashpromo",
src: "/site/resources/dynamic/homelowpromos/
316x120_Center_TopPicks2.swf"])
}


// Login Form
ui.Form(uid: "LoginForm", clocator: [tag: "form", id: "MiniLogin",
name: "LOGIN"], group: "true")
{
Container(uid: "LoginSection", clocator: [tag: "div", class:
"primary"])
{
InputBox(uid: "UserName", clocator: [tag: "input", direct:
"true", type: "text", id: "userid", name: "userid"])
InputBox(uid: "Password", clocator: [tag: "input", direct:
"true", type: "password", id: "password", name: "password"])
InputBox(uid: "LoginBtn", clocator: [tag: "input", direct:
"true", type: "image", name: "loginbtn", src: "/site/resources/
v4_includes/login_btn.gif"])
}
UrlLink(uid: "NewUsers", clocator: [tag: "a", text: "New Users",
href: "/English/myCitrix/loginNewUser.asp"])
}
}

//Add your methods here
public void doMyCitrixLogin(String UserName,String Password){
clickLogin()
type "LoginForm.LoginSection.UserName",UserName
type "LoginForm.LoginSection.Password",Password
click "LoginForm.LoginSection.LoginBtn"
waitForPageToLoad()

}
//Add your methods here
public void clickProductsAndSolutions(){
click "CitrixSection.TopMenu.ProductsandSolutionsLink";
waitForPageToLoad()
}
public void clickMyCitrix(){
click "CitrixHomePage.TopMenu.MyCitrixLink"
waitForPageToLoad()
}
public void clickLogin(){
click "CitrixHomePage.LoginLink"
waitForPageToLoad()
}
public void clickLogout(){
click "CitrixHomePage.LogOutLink"
waitForPageToLoad()

John

unread,
Aug 18, 2009, 9:31:22 AM8/18/09
to tellurium-users
Hope some Tellurium users could share with you their experiences on
UI module maintenance. Basically, you should divide the web page into
many small UI modules for easier testing and maintenance.

Trump 0.1.0 does have some issues and we did not get enough feedback.
With your live site, certainly we can debug Trump to find out what is
the problem
there. The obstacle is time. I am very busy with user support and many
other tasks.
It may take me some time before I get back to you. I will keep you
posted.

Thanks,

Jian

satyadev

unread,
Aug 18, 2009, 9:32:33 AM8/18/09
to tellurium-users
and my dummy test script


@BeforeClass
public static void initUi() {
app = new CitrixHomePageUI();
app.defineUi();
// app.useJQuerySelector();
// app.enableSelectorCache();
}
@Test
public void test1()
{
// go to WebSite index page
//selenium.open("/lang/English/home.asp");
connectUrl("http://www.citrix.com/lang/English/home.asp");
// Verify webSite content
app.waitForPageToLoad(30000);
assertEquals("Citrix Systems - Virtualization, Networking and Cloud.
Simplified.", app.getTitle());

assertTrue(app.isTextPresent("Products & Solutions"));
app.clickProductsAndSolutions();
assertEquals("Citrix Systems » The Best Application Delivery
Solution", app.getTitle());

// Login to MyCitrix
app.doMyCitrixLogin("mkr836","mk836!");
assertTrue(app.isTextPresent("Welcome to My Citrix!"));
assertTrue(app.isTextPresent("CITRIX TEST ACCOUNT1 >> ID:"));

// Logout from Mycitrix
app.clickLogout();

John

unread,
Aug 18, 2009, 12:40:08 PM8/18/09
to tellurium-users
You way is fine. Each nested UI component after "ui." is a separate
UI module.

If you really need to reuse some of the UI modules in multiple UIs,
for example,
the login module, you can define a separate UI module class for it,
i.e.,

LoginModule extends DslContext{
public void defineUi() {
// Citrix home page Top Menus
ui.Container(uid: "CitrixHomePage", clocator: [tag:
"div", id:
"supnav"])
{
UrlLink(uid: "LoginLink", clocator: [tag: "a",
text: "Log in",
header: "/default:span[@id='unav_login']", href: "/English/mycitrix/
index.asp"])
Container(uid: "TopMenu", clocator: [tag:
"div", class: "qmmc",
id: "qm1"]){
UrlLink(uid: "MyCitrixLink", clocator:
[tag: "a", text: "My
Citrix", position: "7", direct: "true", href: "/English/mycitrix/
index.asp?ntref=hp_util_US"])
UrlLink(uid: "GlobalSitesLink",
clocator: [tag: "a", text:
"Global Sites", position: "6", direct: "true", href: "/global"])
}
UrlLink(uid: "LogOutLink", clocator: [tag:
"a", text: "Log Out",
href: "/English/mycitrix/logout.asp"])
}
}

public void doMyCitrixLogin(String UserName,String Password){
clickLogin()
type "LoginForm.LoginSection.UserName",UserName
type "LoginForm.LoginSection.Password",Password
click "LoginForm.LoginSection.LoginBtn"
waitForPageToLoad()

}
}

Then in your test code, you have

LoginModule um = new LoginModule();
um.defineUI();

You can use multiple UI module classes in one test class, for example,

LoginModule um = new LoginModule();
um.defineUI();
NavigatorModule nm = new NavigatorModule();
nm.defineUI();

Then, just call methods in um and nm to run tests.

Thanks,

Jian

satyadev

unread,
Aug 19, 2009, 4:33:32 AM8/19/09
to tellurium-users
Hi,

I divided whole modules as suggested in mail. Even though I am not
able to click on specific element after refactoring UI.

/**
*
*/
package com.citrix.tellurium.ui

import org.tellurium.dsl.DslContext


/**
* @author satyadevs
*
*/
public class CitrixHomePageUI extends DslContext{

public void defineUi() {
// Citrix home page Top Menus
ui.Container(uid: "CitrixHomePage", clocator: [tag: "div", id:
"supnav"])
{
UrlLink(uid: "LoginLink", clocator: [tag: "a", text: "Log in",
header: "/default:span[@id='unav_login']", href: "/English/mycitrix/
index.asp"])
Container(uid: "TopMenu", clocator: [tag: "div", class: "qmmc",
id: "qm1"])
{
UrlLink(uid: "MyCitrixLink", clocator: [tag: "a", text: "My
Citrix", position: "7", direct: "true", href: "/English/mycitrix/
index.asp?ntref=hp_util_US"])
UrlLink(uid: "GlobalSitesLink", clocator: [tag: "a", text:
"Global Sites", position: "6", direct: "true", href: "/global"])
}
UrlLink(uid: "LogOutLink", clocator: [tag: "a", text: "Log Out",
href: "/English/mycitrix/logout.asp"])
}

}


//Add your methods here

public void clickMyCitrix(){
click "CitrixHomePage.TopMenu.MyCitrixLink"
waitForPageToLoad()
}
public void clickLogin(){
click "CitrixHomePage.LoginLink"
waitForPageToLoad()
}
public void clickLogout(){
click "CitrixHomePage.LogOutLink"
waitForPageToLoad()
}
}

package com.citrix.tellurium.ui

import org.tellurium.dsl.DslContext


/**
* @author satyadevs
*
*/
public class LoginModuleUI extends DslContext{

public void defineUi()
{
// Login Form
ui.Form(uid: "LoginForm", clocator: [tag: "form", id: "MiniLogin",
name: "LOGIN"], group: "true")
{
Container(uid: "LoginSection", clocator: [tag: "div", class:
"primary"])
{
InputBox(uid: "UserName", clocator: [tag: "input", direct:
"true", type: "text", id: "userid", name: "userid"])
InputBox(uid: "Password", clocator: [tag: "input", direct:
"true", type: "password", id: "password", name: "password"])
InputBox(uid: "LoginBtn", clocator: [tag: "input", direct:
"true", type: "image", name: "loginbtn", src: "/site/resources/
v4_includes/login_btn.gif"])
}
UrlLink(uid: "NewUsers", clocator: [tag: "a", text: "New Users",
href: "/English/myCitrix/loginNewUser.asp"])
}
}
//Add your methods here
public void doMyCitrixLogin(String UserName,String Password){

type "LoginForm.LoginSection.UserName",UserName
type "LoginForm.LoginSection.Password",Password
click "LoginForm.LoginSection.LoginBtn"
waitForPageToLoad()

}
}

/**
*
*/
package com.citrix.tellurium.ui

import org.tellurium.dsl.DslContext



/**
* @author satyadevs
*
*/
public class HomePageSectionUI extends DslContext
{

public void defineUi()
{
ui.Container(uid: "HomePageSection", clocator: [tag: "div", class:
"qmmc", id: "qm0"])
{
UrlLink(uid: "ProductsAndSolutionsLink", clocator: [tag: "a",
text: "Products & Solutions", href: "/English/ps2/products/product.asp?
contentID=683711&ntref=hp_nav_US"])
UrlLink(uid: "DownloadsLink", clocator: [tag: "a", text:
"Downloads", href: "/English/ss/downloads/index.asp?ntref=hp_nav_US"])
// TextBox(uid: "HomePageFlash", clocator: [tag: "embed", type:
"application/x-shockwave-flash", name: "flashpromo", id: "flashpromo",
src: "/site/resources/dynamic/homeLeftPromos/
980x290_SimplicityIsPower2.swf"])
}
}

//Add your methods here
public void clickProductsAndSolutions()
{
click "HomePageSection.ProductsAndSolutionsLink"
waitForPageToLoad()

satyadev

unread,
Aug 19, 2009, 4:34:42 AM8/19/09
to tellurium-users
package com.citrix.tellurium.test;

import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;

import org.tellurium.test.java.TelluriumTestNGTestCase;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import com.citrix.tellurium.ui.*;

public class DemoCitrixPage extends TelluriumTestNGTestCase {

private static CitrixHomePageUI app;
private static LoginModuleUI LoginUI;
private static HomePageSectionUI SectionUI;
@BeforeClass
public static void initUi() {
app = new CitrixHomePageUI();
app.defineUi();
app.useJQuerySelector();
app.enableSelectorCache();
// Login module
LoginUI = new LoginModuleUI();
LoginUI.defineUi();
LoginUI.useJQuerySelector();
LoginUI.enableSelectorCache();
// Home Page section UI Links
SectionUI = new HomePageSectionUI();
SectionUI.defineUi();
SectionUI.useJQuerySelector();
SectionUI.enableSelectorCache();
}
@Test
public void test1()
{
// go to WebSite index page
//selenium.open("/lang/English/home.asp");
connectUrl("http://www.citrix.com/lang/English/home.asp");
// Verify webSite content
app.waitForPageToLoad(30000);
assertEquals("Citrix Systems - Virtualization, Networking and Cloud.
Simplified.", app.getTitle());

assertTrue(app.isTextPresent("Products & Solutions"));
SectionUI.clickProductsAndSolutions();
assertEquals("Citrix Systems » The Best Application Delivery
Solution", app.getTitle());

// Login to MyCitrix
app.clickLogin();
LoginUI.doMyCitrixLogin("a","b");
assertTrue(app.isTextPresent("Welcome to My Citrix!"));
assertTrue(app.isTextPresent("CITRIX TEST ACCOUNT1 >> ID:
3003908"));

// Logout from Mycitrix
app.clickLogout();
}
}

satyadev

unread,
Aug 19, 2009, 4:37:49 AM8/19/09
to tellurium-users
Now I am unable to click simple link like products and solutions. I
get following error message.

groovy.lang.MissingMethodException: No signature of method:
com.citrix.tellurium.ui.CitrixHomePageUI.click() is applicable for
argument types: (java.lang.String) values:
[HomePageSection.ProductsAndSolutionsLink]
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap
(ScriptBytecodeAdapter.java:54)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN
(ScriptBytecodeAdapter.java:90)
at com.citrix.tellurium.ui.HomePageSectionUI.clickProductsAndSolutions
(HomePageSectionUI.groovy:30)
at com.citrix.tellurium.test.DemoCitrixPage.test1(DemoCitrixPage.java:
44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:
580)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
at org.testng.internal.TestMethodWorker.invokeTestMethods
(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:
110)
at org.testng.TestRunner.runWorkers(TestRunner.java:712)
at org.testng.TestRunner.privateRun(TestRunner.java:582)
at org.testng.TestRunner.run(TestRunner.java:477)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
at org.testng.SuiteRunner.run(SuiteRunner.java:198)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:823)
at org.testng.TestNG.runSuitesLocally(TestNG.java:790)
at org.testng.TestNG.run(TestNG.java:708)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)

satyadev

unread,
Aug 19, 2009, 4:41:26 AM8/19/09
to tellurium-users
then I tried for other linke i.e Login on same site even that also
failing with following exception.

com.thoughtworks.selenium.SeleniumException: ERROR: Element
jquerycache={"unique":true,"locator":"#supnav default:span a[href=\/
English\/mycitrix\/index.asp]:te_text(Log in)","optimized":"#supnav
default:span a[href=\/English\/mycitrix\/index.asp]:te_text(Log
in)","uid":"CitrixHomePage.LoginLink","cacheable":true} not found
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError
(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand
(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.DefaultSelenium.click
(DefaultSelenium.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke
(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1061)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at groovy.lang.DelegatingMetaClass.invokeMethod
(DelegatingMetaClass.java:142)
at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
at org.tellurium.dispatch.Dispatcher.invokeMethod(Dispatcher.groovy:
26)
at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call
(PogoInterceptableSite.java:46)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:124)
at org.tellurium.event.EventHandler$_click_closure6.doCall
(EventHandler.groovy:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke
(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod
(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent
(PogoMetaClassSite.java:66)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent
(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent
(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent
(AbstractCallSite.java:150)
at org.tellurium.event.EventHandler$_click_closure6.doCall
(EventHandler.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke
(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod
(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call
(PogoMetaClassSite.java:39)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:120)
at org.tellurium.event.EventHandler$_processEvents_closure1.doCall
(EventHandler.groovy:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke
(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod
(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at groovy.lang.Closure.call(Closure.java:279)
at groovy.lang.Closure.call(Closure.java:292)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each
(DefaultGroovyMethods.java:1165)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each
(DefaultGroovyMethods.java:1141)
at org.codehaus.groovy.runtime.dgm$87.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite
$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:
270)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call
(PojoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:124)
at org.tellurium.event.EventHandler.processEvents(EventHandler.groovy:
69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite
$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:
266)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent
(PogoMetaMethodSite.java:51)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent
(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent
(AbstractCallSite.java:142)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent
(AbstractCallSite.java:162)
at org.tellurium.event.EventHandler.click(EventHandler.groovy:146)
at org.tellurium.event.EventHandler$click.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:128)
at org.tellurium.dsl.BaseDslContext$_click_closure3.doCall
(BaseDslContext.groovy:221)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke
(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod
(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call
(PogoMetaClassSite.java:39)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:128)
at org.tellurium.object.UrlLink.click(UrlLink.groovy:17)
at org.tellurium.object.UrlLink$click.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:124)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe
(AbstractCallSite.java:89)
at org.tellurium.dsl.BaseDslContext.click(BaseDslContext.groovy:219)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke
(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1061)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN
(ScriptBytecodeAdapter.java:77)
at com.citrix.tellurium.ui.CitrixHomePageUI.clickLogin
(CitrixHomePageUI.groovy:38)
at com.citrix.tellurium.test.DemoCitrixPage.test1(DemoCitrixPage.java:
48)
> ...
>
> read more »

Vivek

unread,
Aug 19, 2009, 10:09:46 AM8/19/09
to tellurium-users
I am looking into this issue... I'll get back to you...

Thanks,
Vivek
> ...
>
> read more »

John

unread,
Aug 19, 2009, 10:36:52 AM8/19/09
to tellurium-users
Seems the direct: "true" attribute in the UI module is not correct,
try the following UI module


public class CitrixHomePageUI extends DslContext {

public void defineUi() {
// Citrix home page Top Menus
ui.Container(uid: "CitrixHomePage", clocator: [tag: "div", id:
"supnav"]) {
UrlLink(uid: "LoginLink", clocator: [tag: "a", text: "Log in",
href: "/English/mycitrix/index.asp"])
Container(uid: "TopMenu", clocator: [tag: "div", class: "qmmc",
id: "qm1"])
{
UrlLink(uid: "MyCitrixLink", clocator: [tag: "a",
text: "My Citrix", position: "7", direct: "true", href: "/English/
mycitrix/index.asp?ntref=hp_util_US"])
UrlLink(uid: "GlobalSitesLink", clocator: [tag: "a",
text: "Global Sites", position: "6", direct: "true", href: "/global"])
}
UrlLink(uid: "LogOutLink", clocator: [tag: "a", text: "Log Out",
href: "/English/mycitrix/logout.asp"])
}
}

//Add your methods here

public void clickMyCitrix() {
click "CitrixHomePage.TopMenu.MyCitrixLink"
waitForPageToLoad(5000)
}

public void clickLogin() {
click "CitrixHomePage.LoginLink"
waitForPageToLoad(5000)
}

public void clickLogout() {
click "CitrixHomePage.LogOutLink"
waitForPageToLoad(5000)
}

}


public class HomePageSectionUI extends DslContext {

public void defineUi() {
ui.Container(uid: "HomePageSection", clocator: [tag: "div", class:
"qmmc", id: "qm0"]) {
UrlLink(uid: "ProductsAndSolutionsLink", clocator: [tag: "a",
text: "Products & Solutions", href: "*/English/ps2/products/
product.asp"])
UrlLink(uid: "DownloadsLink", clocator: [tag: "a", text:
"Downloads", href: "*/English/ss/downloads/index.asp"])
// TextBox(uid: "HomePageFlash", clocator: [tag: "embed",
type: "application/x-shockwave-flash", name: "flashpromo", id:
"flashpromo", src: "/site/resources/dynamic/homeLeftPromos/980
x290_SimplicityIsPower2.swf "])
}
}

//Add your methods here
public void clickProductsAndSolutions() {
click "HomePageSection.ProductsAndSolutionsLink"
waitForPageToLoad(5000)
}

public class LoginModuleUI extends DslContext {

public void defineUi() {
// Login Form
ui.Form(uid: "LoginForm", clocator: [tag: "form", id: "MiniLogin",
name: "LOGIN"], group: "true") {
Container(uid: "LoginSection", clocator: [tag: "div", class:
"primary"]) {
InputBox(uid: "UserName", clocator: [tag: "input", type:
"text", id: "userid", name: "userid"])
InputBox(uid: "Password", clocator: [tag: "input", type:
"password", id: "password", name: "password"])
Button(uid: "LoginBtn", clocator: [tag: "input", type:
"image", name: "loginbtn"])
}
UrlLink(uid: "NewUsers", clocator: [tag: "a", text: "New Users",
href: "/English/myCitrix/loginNewUser.asp"])
}
}
//Add your methods here
public void doMyCitrixLogin(String UserName, String Password) {

type "LoginForm.LoginSection.UserName", UserName
type "LoginForm.LoginSection.Password", Password
click "LoginForm.LoginSection.LoginBtn"
waitForPageToLoad(5000)

}

}

The other issue is that your login button is an InputBox object, which
does not
have a click method. I changed it to a Button object.

Thanks,

Jian
On Aug 19, 4:41 am, satyadev <svnsa...@gmail.com> wrote:
> ...
>
> read more »

satyadev

unread,
Aug 19, 2009, 1:24:08 PM8/19/09
to tellurium-users
Hi,

I tried as you suggested i.e. removed direct:true in UI modules.

even though same exception stack trace observed.

regards,
Satyadev
> ...
>
> read more »

Jian Fang

unread,
Aug 19, 2009, 1:27:16 PM8/19/09
to telluri...@googlegroups.com
Shouldn't. I checked in your UI module and test code to trunk/core project. Please check it out
and run DemoCitrixPageTestCase. I haven't got it all working, but it runs fine until to the following line


LoginUI.doMyCitrixLogin("a", "b");

Thanks,

Jian

satyadev

unread,
Aug 20, 2009, 8:03:46 AM8/20/09
to tellurium-users
Hi Jian,

Thanks for prompt info. Now I was able to execute my test case at
last :).

Till an hour ago I was trapped with exception
[groovy.lang.MissingMethodException: No signature of method:
com.citrix.tellurium.ui.CitrixHomePageUI.click() is applicable for
argument types: (java.lang.String) values: ]

I created new project and cleaned recompiled even though above error
is appearing.

then I get to know its problem with eclipse plugin. I found it from
tellurium-users group. then I installed latest plug-in from url :
http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.4/
[2.0.0.20090814-1100-e34-n]

Now I am NOT getting above exception and able to execute my test
case. I hope we don't have any dependency on eclipse-plug-in so by
updating documentation will help people using Eclipse.
> ...
>
> read more »

Jian Fang

unread,
Aug 20, 2009, 8:53:09 AM8/20/09
to telluri...@googlegroups.com
Glad you can run your tests now. Thanks for your suggestion. We will put the dependency into our User guide.

Thanks,

Jian
Reply all
Reply to author
Forward
0 new messages