|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Conditional using HTMLUnitGood Morning,
I am trying to write tests for an ecommerce site. I select the first product on a page using an xpath expression. The problem is, this may or may not have a ‘select size’ or ‘select color’ drop down (for example, if the first product is a bottle of perfume).
Using HTML unit – how can I set these select boxes only if they are present on the page. Is there a way to use conditional logic within an html unit test? Or else is there a way to skip a tag and continue the test if the element is not on the page.
Thanks!
Brendan Kelly
------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Jameleon-users mailing list Jameleon-users@... https://lists.sourceforge.net/lists/listinfo/jameleon-users |
|
|
Re: Conditional using HTMLUnitHi Brendan,
The short answer is yes.
The long answer is there are two ways to do this:
- Write your own custom tag (this is the recommended way)
- creating a simple custom tag - http://jameleon.sourceforge.net/getting-started/customFunctionalPoints.html
- for an htmlunit custom tag - http://jameleon.sourceforge.net/htmlunit-plugin/getting-started/customFunctionalPoints.html
- some documentation on the HtmlUnitFunctionTag - http://jameleon.sourceforge.net/htmlunit-plugin/apidocs/net/sf/jameleon/plugin/htmlunit/HtmlUnitFunctionTag.html
- Use Jelly tags http://commons.apache.org/jelly/tags.html
There is an <if/> tag. I have some examples in the tests for jameleon-core if you learn by example. http://jameleon.svn.sourceforge.net/viewvc/jameleon/trunk/jameleon-core/tst/xml/framework/skipIfOrganization.xml?revision=1185&view=markup
Hope this helps,
Christian
From: "jameleon-users@..." <jameleon-users@...> To: "jameleon-users@..." <jameleon-users@...>; "jameleon-developers@..." <jameleon-developers@...> Sent: Sunday, May 10, 2009 8:24:24 PM Subject: [Jameleon-users] Conditional using HTMLUnit Good Morning,
I am trying to write tests for an ecommerce site. I select the first product on a page using an xpath expression. The problem is, this may or may not have a ‘select size’ or ‘select color’ drop down (for example, if the first product is a bottle of perfume).
Using HTML unit – how can I set these select boxes only if they are present on the page. Is there a way to use conditional logic within an html unit test? Or else is there a way to skip a tag and continue the test if the element is not on the page.
Thanks!
Brendan Kelly
------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Jameleon-users mailing list Jameleon-users@... https://lists.sourceforge.net/lists/listinfo/jameleon-users |
|
|
Selenium problem
This problem is specific All New Mail of Yahoo. I was trying to automate following steps in all new yahoo mail version...
1. Login into new version of Yahoo Mail
selenium.open("/config/login_verify2?&.src=ym");
Last line neither throw any error nor it does open new window for writing mail.
Does anyone aware of this problems? Explore and discover exciting holidays and getaways with Yahoo! India Travel Click here! ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Jameleon-users mailing list Jameleon-users@... https://lists.sourceforge.net/lists/listinfo/jameleon-users |
| Free embeddable forum powered by Nabble | Forum Help |