What do you mean new Tellurium does not allow the IDs?
Based on your html, I defined the following UI module
ui.UrlLink(uid: "U3", clocator: [id: "substituterForm:enterRunA3"])
ui.UrlLink(uid: "U2", clocator: [id: "substituterForm:enterRunA2"])
ui.UrlLink(uid: "U1", clocator: [id: "substituterForm:enterRunA1"])
and the tests work fine.
The code is available at
http://code.google.com/p/aost/source/browse/trunk/core/src/test/groovy/org/telluriumsource/ft/ImageTestCase.java
BTW, for dynamic IDs, you can use partial Ids, for instance, "*enterRunA3".
Thanks,
Jian
On Fri, May 21, 2010 at 12:10 AM, khush <[email protected]> wrote:
> Hi All,
>
> I am getting one problem with tellurium 7. On my web page i am having
> three images having onclick event associated with them and their
> source code is like as follows :
> For image 1 :
> <table class="formGrid"><tbody><tr><td><a href="#" onclick="return
> oamSubmitForm('substituterForm','substituterForm:enterRunA3');"
> id="substituterForm:enterRunA3"><img src="/btweb/ui_pics/search.gif"></
> a></td>
> </tr></tbody></table>
>
> For image 2 :
> <table class="formGrid"><tbody><tr><td><a href="#" onclick="return
> oamSubmitForm('substituterForm','substituterForm:enterRunA2');"
> id="substituterForm:enterRunA2"><img src="/btweb/ui_pics/search.gif"></
> a></td>
> </tr></tbody></table>
>
> For image 3 :
> <table class="formGrid"><tbody><tr><td><a href="#" onclick="return
> oamSubmitForm('substituterForm','substituterForm:enterRunA1');"
> id="substituterForm:enterRunA1"><img src="/btweb/ui_pics/search.gif"></
> a></td>
> </tr></tbody></table>
>
> Now we can see that the <a> tag is having only id attribute and id
> attribute is having special character colon (: ) which is not allowed
> in new tellurium.
> My first question is how can i define them in UI so that all the
> images can be differentiated from each other.
>
> Now if i delete the id element and then try to call these images
> like :
>
>
> then i get the following err :
> com.thoughtworks.selenium.SeleniumException: ERROR: Command execution
> failure. Please search the Tellurium User Group at
> http://groups.google.com/group/tellurium-users for error details from
> the log window. The error message is: element.dispatchEvent is not a
> function
> JavaScript Error Stack:
> {anonymous}(null)@http://localhost:4444/selenium-server/core/scripts/
> utils.js:589
>
> printStackTrace()@http://localhost:4444/selenium-server/core/scripts/
> utils.js:574
>
> {anonymous}("Command execution failure. Please search the Tellurium
> User Group at http://groups.google.com/group/tellurium-users for error
> details from the log window. The error message is:
> element.dispatchEvent is not a function")@http://localhost:4444/
> selenium-server/core/scripts/selenium-remoterunner.js:276<http://localhost:4444/%0Aselenium-server/core/scripts/selenium-remoterunner.js:276>
>
> {anonymous}([object Error])@http://localhost:4444/selenium-server/core/
> scripts/selenium-executionloop.js:127<http://localhost:4444/selenium-server/core/%0Ascripts/selenium-executionloop.js:127>
>
> {anonymous}(6)@http://localhost:4444/selenium-server/core/scripts/
> selenium-executionloop.js:81<http://localhost:4444/selenium-server/core/scripts/%0Aselenium-executionloop.js:81>
>
> {anonymous}(6)@http://localhost:4444/selenium-server/core/scripts/
> htmlutils.js:60{anonymous}(null)@http://localhost:4444/selenium-server/
> core/scripts/utils.js:589,printStackTrace()@http://localhost:4444/
> selenium-server/core/scripts/utils.js:574,{anonymous}(<http://localhost:4444/selenium-server/%0Acore/scripts/utils.js:589,printstacktrace%28...@http://localhost:4444/%0Aselenium-server/core/scripts/utils.js:574,%7Banonymous%7D%28>
> "Command
> execution failure. Please search the Tellurium User Group at
> http://groups.google.com/group/tellurium-users for error details from
> the log window. The error message is: element.dispatchEvent is not a
> function")@http://localhost:4444/selenium-server/core/scripts/selenium-
> remoterunner.js:276,{anonymous}([object<http://localhost:4444/selenium-server/core/scripts/selenium-%0Aremoterunner.js:276,%7Banonymous%7D%28[object>Error])@
> http://localhost:4444/
> selenium-server/core/scripts/selenium-executionloop.js:127,{anonymous}<http://localhost:4444/%0Aselenium-server/core/scripts/selenium-executionloop.js:127,%7Banonymous%7D>
> (6)@http://localhost:4444/selenium-server/core/scripts/selenium-
> executionloop.js:81,{anonymous}(6)@http://localhost:4444/selenium-
> server/core/scripts/htmlutils.js:60<http://localhost:4444/selenium-server/core/scripts/selenium-%0Aexecutionloop.js:81,%7banonymous%7d%286...@http://localhost:4444/selenium-%0Aserver/core/scripts/htmlutils.js:60>
> at
>
> com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
> 97)
> at com
>
> It may be because i am having similar elements so click event becomes
> confused.
> Anybody has any idea?
>
> Thanks and Rgds,
> Khush.
>
> --
> 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]<tellurium-users%[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.