You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alec Swan <al...@gmail.com> on 2012/06/19 16:39:31 UTC

Verifying image HREF with Wicket tester

Hello,

How can I access and verify the HREF attribute of an Image with WicketTester?

Thanks,

Alec

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


Re: Verifying image HREF with Wicket tester

Posted by Carl-Eric Menzel <cm...@wicketbuch.de>.
In this case, yes, I think.

Carl-Eric

On Wed, 20 Jun 2012 09:27:27 -0600
Alec Swan <al...@gmail.com> wrote:

> So, this is a bug, right?
> 
> On Wed, Jun 20, 2012 at 2:36 AM, Martin Grigorov
> <mg...@apache.org> wrote:
> > On Wed, Jun 20, 2012 at 11:34 AM, Carl-Eric Menzel
> > <cm...@wicketbuch.de> wrote:
> >> On Tue, 19 Jun 2012 15:21:17 -0600
> >> Alec Swan <al...@gmail.com> wrote:
> >>
> >>> I had to make sure that my <img> element had a closing </img>
> >>>
> >>> The problem is that
> >>> org.apache.wicket.util.tester.TagTester#createTagByAttribute
> >>> requires the <img> element to be closed, i.e. <img/> or
> >>> <img></img>. Otherwise closeTag variable is never set and the
> >>> loop does not exit.
> >>>
> >>> Seems like a bug to me, isn't it?
> >>
> >> A lone open <img> tag wouldn't be valid XHTML. Does our HTML5
> >> support include support for non-wellformed documents?
> >
> > Yes.
> >
> >>
> >> Carl-Eric
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


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


Re: Verifying image HREF with Wicket tester

Posted by Alec Swan <al...@gmail.com>.
So, this is a bug, right?

On Wed, Jun 20, 2012 at 2:36 AM, Martin Grigorov <mg...@apache.org> wrote:
> On Wed, Jun 20, 2012 at 11:34 AM, Carl-Eric Menzel
> <cm...@wicketbuch.de> wrote:
>> On Tue, 19 Jun 2012 15:21:17 -0600
>> Alec Swan <al...@gmail.com> wrote:
>>
>>> I had to make sure that my <img> element had a closing </img>
>>>
>>> The problem is that
>>> org.apache.wicket.util.tester.TagTester#createTagByAttribute requires
>>> the <img> element to be closed, i.e. <img/> or <img></img>. Otherwise
>>> closeTag variable is never set and the loop does not exit.
>>>
>>> Seems like a bug to me, isn't it?
>>
>> A lone open <img> tag wouldn't be valid XHTML. Does our HTML5 support
>> include support for non-wellformed documents?
>
> Yes.
>
>>
>> Carl-Eric
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

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


Re: Verifying image HREF with Wicket tester

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Jun 20, 2012 at 11:34 AM, Carl-Eric Menzel
<cm...@wicketbuch.de> wrote:
> On Tue, 19 Jun 2012 15:21:17 -0600
> Alec Swan <al...@gmail.com> wrote:
>
>> I had to make sure that my <img> element had a closing </img>
>>
>> The problem is that
>> org.apache.wicket.util.tester.TagTester#createTagByAttribute requires
>> the <img> element to be closed, i.e. <img/> or <img></img>. Otherwise
>> closeTag variable is never set and the loop does not exit.
>>
>> Seems like a bug to me, isn't it?
>
> A lone open <img> tag wouldn't be valid XHTML. Does our HTML5 support
> include support for non-wellformed documents?

Yes.

>
> Carl-Eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Verifying image HREF with Wicket tester

Posted by Carl-Eric Menzel <cm...@wicketbuch.de>.
On Tue, 19 Jun 2012 15:21:17 -0600
Alec Swan <al...@gmail.com> wrote:

> I had to make sure that my <img> element had a closing </img>
> 
> The problem is that
> org.apache.wicket.util.tester.TagTester#createTagByAttribute requires
> the <img> element to be closed, i.e. <img/> or <img></img>. Otherwise
> closeTag variable is never set and the loop does not exit.
> 
> Seems like a bug to me, isn't it?

A lone open <img> tag wouldn't be valid XHTML. Does our HTML5 support
include support for non-wellformed documents?

Carl-Eric

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


Re: Verifying image HREF with Wicket tester

Posted by Martin Grigorov <mg...@apache.org>.
Yes, this should be improved.
Please create a ticket with a test case.

On Wed, Jun 20, 2012 at 12:21 AM, Alec Swan <al...@gmail.com> wrote:
> I had to make sure that my <img> element had a closing </img>
>
> The problem is that
> org.apache.wicket.util.tester.TagTester#createTagByAttribute requires
> the <img> element to be closed, i.e. <img/> or <img></img>. Otherwise
> closeTag variable is never set and the loop does not exit.
>
> Seems like a bug to me, isn't it?
>
> On Tue, Jun 19, 2012 at 1:18 PM, Martin Grigorov <mg...@apache.org> wrote:
>> Fire the debugger and see what happens.
>>
>> On Tue, Jun 19, 2012 at 8:56 PM, Alec Swan <al...@gmail.com> wrote:
>>> Martin, if there was a problem with repeater wouldn't I have had
>>> multiple myPanel components? Yet, tester.getTagByWicketId("myPanel")
>>> works.
>>>
>>> On Tue, Jun 19, 2012 at 9:46 AM, Alec Swan <al...@gmail.com> wrote:
>>>> getTagByWicketId(..) JavaDoc says that if there are multiple
>>>> components with this wicket:id it will return the first one. Besides,
>>>> we only have one cell in the table, so there should be only one
>>>> myImage element.
>>>>
>>>> On Tue, Jun 19, 2012 at 9:37 AM, Martin Grigorov <mg...@apache.org> wrote:
>>>>> On Tue, Jun 19, 2012 at 6:26 PM, Alec Swan <al...@gmail.com> wrote:
>>>>>> Martin, this method works fine on the top page elements but not on the
>>>>>> nested panel's elements. I need to get the HREF attribute of
>>>>>> "myForm:rows:1:cols:2:myPanel:myImage" on the top page.
>>>>>
>>>>> '2' is the component id of an item inside a repeater.
>>>>> That means you have several components with id 'myImage'
>>>>>
>>>>>>
>>>>>> THIS WORKS: tester.getTagByWicketId("myForm")
>>>>>> THIS WORKS: tester.getTagByWicketId("rows")
>>>>>> THIS WORKS: tester.getTagByWicketId("myPanel")
>>>>>>
>>>>>> THIS DOES NOT WORK: tester.getTagByWicketId("myImage")
>>>>>> THIS DOES NOT WORK: tester.getTagByWicketId("myPanel:myImage")
>>>>>>
>>>>>> Thoughts?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Alec
>>>>>>
>>>>>> On Tue, Jun 19, 2012 at 8:42 AM, Martin Grigorov <mg...@apache.org> wrote:
>>>>>>> See #getTagBy*** methods.
>>>>>>> This way you get a TagTester and then you can check the attributes.
>>>>>>>
>>>>>>> On Tue, Jun 19, 2012 at 5:39 PM, Alec Swan <al...@gmail.com> wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> How can I access and verify the HREF attribute of an Image with WicketTester?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Alec
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Martin Grigorov
>>>>>>> jWeekend
>>>>>>> Training, Consulting, Development
>>>>>>> http://jWeekend.com
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Martin Grigorov
>>>>> jWeekend
>>>>> Training, Consulting, Development
>>>>> http://jWeekend.com
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Verifying image HREF with Wicket tester

Posted by Alec Swan <al...@gmail.com>.
I had to make sure that my <img> element had a closing </img>

The problem is that
org.apache.wicket.util.tester.TagTester#createTagByAttribute requires
the <img> element to be closed, i.e. <img/> or <img></img>. Otherwise
closeTag variable is never set and the loop does not exit.

Seems like a bug to me, isn't it?

On Tue, Jun 19, 2012 at 1:18 PM, Martin Grigorov <mg...@apache.org> wrote:
> Fire the debugger and see what happens.
>
> On Tue, Jun 19, 2012 at 8:56 PM, Alec Swan <al...@gmail.com> wrote:
>> Martin, if there was a problem with repeater wouldn't I have had
>> multiple myPanel components? Yet, tester.getTagByWicketId("myPanel")
>> works.
>>
>> On Tue, Jun 19, 2012 at 9:46 AM, Alec Swan <al...@gmail.com> wrote:
>>> getTagByWicketId(..) JavaDoc says that if there are multiple
>>> components with this wicket:id it will return the first one. Besides,
>>> we only have one cell in the table, so there should be only one
>>> myImage element.
>>>
>>> On Tue, Jun 19, 2012 at 9:37 AM, Martin Grigorov <mg...@apache.org> wrote:
>>>> On Tue, Jun 19, 2012 at 6:26 PM, Alec Swan <al...@gmail.com> wrote:
>>>>> Martin, this method works fine on the top page elements but not on the
>>>>> nested panel's elements. I need to get the HREF attribute of
>>>>> "myForm:rows:1:cols:2:myPanel:myImage" on the top page.
>>>>
>>>> '2' is the component id of an item inside a repeater.
>>>> That means you have several components with id 'myImage'
>>>>
>>>>>
>>>>> THIS WORKS: tester.getTagByWicketId("myForm")
>>>>> THIS WORKS: tester.getTagByWicketId("rows")
>>>>> THIS WORKS: tester.getTagByWicketId("myPanel")
>>>>>
>>>>> THIS DOES NOT WORK: tester.getTagByWicketId("myImage")
>>>>> THIS DOES NOT WORK: tester.getTagByWicketId("myPanel:myImage")
>>>>>
>>>>> Thoughts?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alec
>>>>>
>>>>> On Tue, Jun 19, 2012 at 8:42 AM, Martin Grigorov <mg...@apache.org> wrote:
>>>>>> See #getTagBy*** methods.
>>>>>> This way you get a TagTester and then you can check the attributes.
>>>>>>
>>>>>> On Tue, Jun 19, 2012 at 5:39 PM, Alec Swan <al...@gmail.com> wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> How can I access and verify the HREF attribute of an Image with WicketTester?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Alec
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Martin Grigorov
>>>>>> jWeekend
>>>>>> Training, Consulting, Development
>>>>>> http://jWeekend.com
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Martin Grigorov
>>>> jWeekend
>>>> Training, Consulting, Development
>>>> http://jWeekend.com
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

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


Re: Verifying image HREF with Wicket tester

Posted by Martin Grigorov <mg...@apache.org>.
Fire the debugger and see what happens.

On Tue, Jun 19, 2012 at 8:56 PM, Alec Swan <al...@gmail.com> wrote:
> Martin, if there was a problem with repeater wouldn't I have had
> multiple myPanel components? Yet, tester.getTagByWicketId("myPanel")
> works.
>
> On Tue, Jun 19, 2012 at 9:46 AM, Alec Swan <al...@gmail.com> wrote:
>> getTagByWicketId(..) JavaDoc says that if there are multiple
>> components with this wicket:id it will return the first one. Besides,
>> we only have one cell in the table, so there should be only one
>> myImage element.
>>
>> On Tue, Jun 19, 2012 at 9:37 AM, Martin Grigorov <mg...@apache.org> wrote:
>>> On Tue, Jun 19, 2012 at 6:26 PM, Alec Swan <al...@gmail.com> wrote:
>>>> Martin, this method works fine on the top page elements but not on the
>>>> nested panel's elements. I need to get the HREF attribute of
>>>> "myForm:rows:1:cols:2:myPanel:myImage" on the top page.
>>>
>>> '2' is the component id of an item inside a repeater.
>>> That means you have several components with id 'myImage'
>>>
>>>>
>>>> THIS WORKS: tester.getTagByWicketId("myForm")
>>>> THIS WORKS: tester.getTagByWicketId("rows")
>>>> THIS WORKS: tester.getTagByWicketId("myPanel")
>>>>
>>>> THIS DOES NOT WORK: tester.getTagByWicketId("myImage")
>>>> THIS DOES NOT WORK: tester.getTagByWicketId("myPanel:myImage")
>>>>
>>>> Thoughts?
>>>>
>>>> Thanks,
>>>>
>>>> Alec
>>>>
>>>> On Tue, Jun 19, 2012 at 8:42 AM, Martin Grigorov <mg...@apache.org> wrote:
>>>>> See #getTagBy*** methods.
>>>>> This way you get a TagTester and then you can check the attributes.
>>>>>
>>>>> On Tue, Jun 19, 2012 at 5:39 PM, Alec Swan <al...@gmail.com> wrote:
>>>>>> Hello,
>>>>>>
>>>>>> How can I access and verify the HREF attribute of an Image with WicketTester?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Alec
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Martin Grigorov
>>>>> jWeekend
>>>>> Training, Consulting, Development
>>>>> http://jWeekend.com
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Verifying image HREF with Wicket tester

Posted by Alec Swan <al...@gmail.com>.
Martin, if there was a problem with repeater wouldn't I have had
multiple myPanel components? Yet, tester.getTagByWicketId("myPanel")
works.

On Tue, Jun 19, 2012 at 9:46 AM, Alec Swan <al...@gmail.com> wrote:
> getTagByWicketId(..) JavaDoc says that if there are multiple
> components with this wicket:id it will return the first one. Besides,
> we only have one cell in the table, so there should be only one
> myImage element.
>
> On Tue, Jun 19, 2012 at 9:37 AM, Martin Grigorov <mg...@apache.org> wrote:
>> On Tue, Jun 19, 2012 at 6:26 PM, Alec Swan <al...@gmail.com> wrote:
>>> Martin, this method works fine on the top page elements but not on the
>>> nested panel's elements. I need to get the HREF attribute of
>>> "myForm:rows:1:cols:2:myPanel:myImage" on the top page.
>>
>> '2' is the component id of an item inside a repeater.
>> That means you have several components with id 'myImage'
>>
>>>
>>> THIS WORKS: tester.getTagByWicketId("myForm")
>>> THIS WORKS: tester.getTagByWicketId("rows")
>>> THIS WORKS: tester.getTagByWicketId("myPanel")
>>>
>>> THIS DOES NOT WORK: tester.getTagByWicketId("myImage")
>>> THIS DOES NOT WORK: tester.getTagByWicketId("myPanel:myImage")
>>>
>>> Thoughts?
>>>
>>> Thanks,
>>>
>>> Alec
>>>
>>> On Tue, Jun 19, 2012 at 8:42 AM, Martin Grigorov <mg...@apache.org> wrote:
>>>> See #getTagBy*** methods.
>>>> This way you get a TagTester and then you can check the attributes.
>>>>
>>>> On Tue, Jun 19, 2012 at 5:39 PM, Alec Swan <al...@gmail.com> wrote:
>>>>> Hello,
>>>>>
>>>>> How can I access and verify the HREF attribute of an Image with WicketTester?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alec
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Martin Grigorov
>>>> jWeekend
>>>> Training, Consulting, Development
>>>> http://jWeekend.com
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>

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


Re: Verifying image HREF with Wicket tester

Posted by Alec Swan <al...@gmail.com>.
getTagByWicketId(..) JavaDoc says that if there are multiple
components with this wicket:id it will return the first one. Besides,
we only have one cell in the table, so there should be only one
myImage element.

On Tue, Jun 19, 2012 at 9:37 AM, Martin Grigorov <mg...@apache.org> wrote:
> On Tue, Jun 19, 2012 at 6:26 PM, Alec Swan <al...@gmail.com> wrote:
>> Martin, this method works fine on the top page elements but not on the
>> nested panel's elements. I need to get the HREF attribute of
>> "myForm:rows:1:cols:2:myPanel:myImage" on the top page.
>
> '2' is the component id of an item inside a repeater.
> That means you have several components with id 'myImage'
>
>>
>> THIS WORKS: tester.getTagByWicketId("myForm")
>> THIS WORKS: tester.getTagByWicketId("rows")
>> THIS WORKS: tester.getTagByWicketId("myPanel")
>>
>> THIS DOES NOT WORK: tester.getTagByWicketId("myImage")
>> THIS DOES NOT WORK: tester.getTagByWicketId("myPanel:myImage")
>>
>> Thoughts?
>>
>> Thanks,
>>
>> Alec
>>
>> On Tue, Jun 19, 2012 at 8:42 AM, Martin Grigorov <mg...@apache.org> wrote:
>>> See #getTagBy*** methods.
>>> This way you get a TagTester and then you can check the attributes.
>>>
>>> On Tue, Jun 19, 2012 at 5:39 PM, Alec Swan <al...@gmail.com> wrote:
>>>> Hello,
>>>>
>>>> How can I access and verify the HREF attribute of an Image with WicketTester?
>>>>
>>>> Thanks,
>>>>
>>>> Alec
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

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


Re: Verifying image HREF with Wicket tester

Posted by Martin Grigorov <mg...@apache.org>.
On Tue, Jun 19, 2012 at 6:26 PM, Alec Swan <al...@gmail.com> wrote:
> Martin, this method works fine on the top page elements but not on the
> nested panel's elements. I need to get the HREF attribute of
> "myForm:rows:1:cols:2:myPanel:myImage" on the top page.

'2' is the component id of an item inside a repeater.
That means you have several components with id 'myImage'

>
> THIS WORKS: tester.getTagByWicketId("myForm")
> THIS WORKS: tester.getTagByWicketId("rows")
> THIS WORKS: tester.getTagByWicketId("myPanel")
>
> THIS DOES NOT WORK: tester.getTagByWicketId("myImage")
> THIS DOES NOT WORK: tester.getTagByWicketId("myPanel:myImage")
>
> Thoughts?
>
> Thanks,
>
> Alec
>
> On Tue, Jun 19, 2012 at 8:42 AM, Martin Grigorov <mg...@apache.org> wrote:
>> See #getTagBy*** methods.
>> This way you get a TagTester and then you can check the attributes.
>>
>> On Tue, Jun 19, 2012 at 5:39 PM, Alec Swan <al...@gmail.com> wrote:
>>> Hello,
>>>
>>> How can I access and verify the HREF attribute of an Image with WicketTester?
>>>
>>> Thanks,
>>>
>>> Alec
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Verifying image HREF with Wicket tester

Posted by Alec Swan <al...@gmail.com>.
Martin, this method works fine on the top page elements but not on the
nested panel's elements. I need to get the HREF attribute of
"myForm:rows:1:cols:2:myPanel:myImage" on the top page.

THIS WORKS: tester.getTagByWicketId("myForm")
THIS WORKS: tester.getTagByWicketId("rows")
THIS WORKS: tester.getTagByWicketId("myPanel")

THIS DOES NOT WORK: tester.getTagByWicketId("myImage")
THIS DOES NOT WORK: tester.getTagByWicketId("myPanel:myImage")

Thoughts?

Thanks,

Alec

On Tue, Jun 19, 2012 at 8:42 AM, Martin Grigorov <mg...@apache.org> wrote:
> See #getTagBy*** methods.
> This way you get a TagTester and then you can check the attributes.
>
> On Tue, Jun 19, 2012 at 5:39 PM, Alec Swan <al...@gmail.com> wrote:
>> Hello,
>>
>> How can I access and verify the HREF attribute of an Image with WicketTester?
>>
>> Thanks,
>>
>> Alec
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

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


Re: Verifying image HREF with Wicket tester

Posted by Martin Grigorov <mg...@apache.org>.
See #getTagBy*** methods.
This way you get a TagTester and then you can check the attributes.

On Tue, Jun 19, 2012 at 5:39 PM, Alec Swan <al...@gmail.com> wrote:
> Hello,
>
> How can I access and verify the HREF attribute of an Image with WicketTester?
>
> Thanks,
>
> Alec
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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