You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Mark W. Shead" <mw...@gmail.com> on 2008/03/20 22:10:43 UTC

Tapestry-Test and WYSIWYG

The Tapestry testing capabilities are really great.  I'm having good  
luck with everything except for dealing with WYSIWYG text areas.  I  
can't seem to get Selenium to fill these in.  I've tried both TinyMCE  
and FCKeditor.

Has anyone found a way to do this?

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Test and WYSIWYG

Posted by adasal <ad...@gmail.com>.
There is another approach to testing where javascript is on the client, that
is to use htmlunit.
HtmlUnit is great, but it can be a big effort to get it going. I came to it
via PushToTest. PushToTest wraps up a lot of things and basically relies on
HtmlUnit 1.13 I think, along with a patch. In the environment I was testing
this seemed to work whereas HtmlUnit 1.14 didn't. But I found I wasn't realy
interested in PushToTest and simply circumvented it, building my own tests
in JUnit. I was able to use JUnit 4. and it is useful to look at the tests
in HtmlUnit to get going.
Basically you need the webclient and htmlpage and your away. HtmlUnit wraps
the Dom in each of its objects. I don't know how this would fit with
tapestry-test as haven't looked at this at all. Not doubt will have to if
next project adopts tapestry!
Main thing, HtmlUnit is a very good api for working with the dom, includes
fairly comprehensive javascript support which is increasing as attention is
being paid to this aspect, and allows setting the whole thing up within
JUnit using usual fixtures, etc. It simulates a browser. so its approach is
completely different to selenium. PushToTest has some macro recording
facility, but it is that I ended up not wanting to use, preferring
everything in code approach. Remember, in code you can use mocking so there
is far greater flexibility that there is using macros, in my opinion.
HTH,
Adam

On 20/03/2008, Mark W. Shead <mw...@gmail.com> wrote:
>
> I scoured OpenQA's forums and I tried those methods before posting
> here.  I figured someone using tapestry-test may have already solved
> the problem already.
>
> The  solutions that look like they would work involve invoking
> javascript, but it doesn't look like this is possible through tapestry-
> test.
>
>
> Mark
>
>
> On Mar 20, 2008, at 5:30 PM, Josh Canfield wrote:
> > Hi Mark,
> >
> > This is more of a Selenium/FCKeditor or Selenium/TinyMCE question...
> >
> > Have you seen this?
> > http://forums.openqa.org/thread.jspa?messageID=21845
> > or
> > http://forums.openqa.org/thread.jspa?messageID=20341
> >
> > Josh
> >
> >
> > On Thu, Mar 20, 2008 at 2:10 PM, Mark W. Shead <mw...@gmail.com>
> > wrote:
> >> The Tapestry testing capabilities are really great.  I'm having good
> >> luck with everything except for dealing with WYSIWYG text areas.  I
> >> can't seem to get Selenium to fill these in.  I've tried both TinyMCE
> >> and FCKeditor.
> >>
> >> Has anyone found a way to do this?
> >>
> >> Mark
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> >
> > --
> > --
> > TheDailyTube.com. Sign up and get the best new videos on the internet
> > delivered fresh to your inbox.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tapestry-Test and WYSIWYG

Posted by "Mark W. Shead" <mw...@gmail.com>.
I scoured OpenQA's forums and I tried those methods before posting  
here.  I figured someone using tapestry-test may have already solved  
the problem already.

The  solutions that look like they would work involve invoking  
javascript, but it doesn't look like this is possible through tapestry- 
test.

Mark

On Mar 20, 2008, at 5:30 PM, Josh Canfield wrote:
> Hi Mark,
>
> This is more of a Selenium/FCKeditor or Selenium/TinyMCE question...
>
> Have you seen this?
> http://forums.openqa.org/thread.jspa?messageID=21845
> or
> http://forums.openqa.org/thread.jspa?messageID=20341
>
> Josh
>
>
> On Thu, Mar 20, 2008 at 2:10 PM, Mark W. Shead <mw...@gmail.com>  
> wrote:
>> The Tapestry testing capabilities are really great.  I'm having good
>> luck with everything except for dealing with WYSIWYG text areas.  I
>> can't seem to get Selenium to fill these in.  I've tried both TinyMCE
>> and FCKeditor.
>>
>> Has anyone found a way to do this?
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> -- 
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Test and WYSIWYG

Posted by "Mark W. Shead" <mw...@gmail.com>.
I finally got this to work with TinyMCE.   Here is what I did in case  
it is useful to someone else:

The form has a field called answer that uses TinyMCE.

			selectFrame("//iframe[@id=\"answer_ifr\"]");
			type("//body", "this is my answer ");
			selectFrame("relative=top");
			clickAndWait(SUBMIT);
			assertTextPresent("Thank You!");


Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Test and WYSIWYG

Posted by Josh Canfield <jo...@thedailytube.com>.
Hi Mark,

This is more of a Selenium/FCKeditor or Selenium/TinyMCE question...

Have you seen this?
http://forums.openqa.org/thread.jspa?messageID=21845
or
http://forums.openqa.org/thread.jspa?messageID=20341

Josh


On Thu, Mar 20, 2008 at 2:10 PM, Mark W. Shead <mw...@gmail.com> wrote:
> The Tapestry testing capabilities are really great.  I'm having good
> luck with everything except for dealing with WYSIWYG text areas.  I
> can't seem to get Selenium to fill these in.  I've tried both TinyMCE
> and FCKeditor.
>
> Has anyone found a way to do this?
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org