You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ville Virtanen <vi...@cerion.fi> on 2009/12/14 08:05:00 UTC

Tapestry 5 and Selenium

Hi,

I've googled around but couldn't find solution for this one. The problem is
that we have to test a form that is loaded using progressive display which
makes all the ids to be generated for each request.

Now, how can I use selenium.type to locate the correct input, when the input
name changes like this:

request one: mpo-1258bc89493_0
request two: mpo-1258bcae418_0
request three: mpo-1258dfea345_0

Has anyone solved this?

 - Ville
-- 
View this message in context: http://old.nabble.com/Tapestry-5-and-Selenium-tp26773754p26773754.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Tapestry 5 and Selenium

Posted by Robert Zeigler <ro...@scazdl.org>.
//input[contains(@id,'mpo')]

Cheers,

Robert

On Dec 14, 2009, at 12/1411:41 AM , Ville Virtanen wrote:

>
> Yep, that's what I was afraid of.
>
> I don't have anything to base my opinion to, but I have a feeling  
> that the
> tests will be really easily broken if and when someone decides to  
> change the
> page layout etc.
>
> This of course is not related to T5 at any level, but rather common  
> problem.
> And that's the only thing afaik that is holding us back from making  
> more
> business minded consultants to make n' bake their own tests. Well,  
> that was
> the dream anyway.. ;) (I suppose that given the nature of the best  
> tools
> today you have to be somewhat technology-aware to actually make  
> meaning full
> tests.)
>
> - Ville
>
>
> Howard Lewis Ship wrote:
>>
>> Identify the fields using XPath instead of id.
>>
>> On Sun, Dec 13, 2009 at 11:05 PM, Ville Virtanen
>> <vi...@cerion.fi> wrote:
>>>
>>> Hi,
>>>
>>> I've googled around but couldn't find solution for this one. The  
>>> problem
>>> is
>>> that we have to test a form that is loaded using progressive display
>>> which
>>> makes all the ids to be generated for each request.
>>>
>>> Now, how can I use selenium.type to locate the correct input, when  
>>> the
>>> input
>>> name changes like this:
>>>
>>> request one: mpo-1258bc89493_0
>>> request two: mpo-1258bcae418_0
>>> request three: mpo-1258dfea345_0
>>>
>>> Has anyone solved this?
>>>
>>>  - Ville
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Tapestry-5-and-Selenium-tp26773754p26773754.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> -- 
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me  
>> to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
> -- 
> View this message in context: http://old.nabble.com/Tapestry-5-and-Selenium-tp26773754p26779936.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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 5 and Selenium

Posted by Ville Virtanen <vi...@cerion.fi>.
Yep, that's what I was afraid of.

I don't have anything to base my opinion to, but I have a feeling that the
tests will be really easily broken if and when someone decides to change the
page layout etc.

This of course is not related to T5 at any level, but rather common problem.
And that's the only thing afaik that is holding us back from making more
business minded consultants to make n' bake their own tests. Well, that was
the dream anyway.. ;) (I suppose that given the nature of the best tools
today you have to be somewhat technology-aware to actually make meaning full
tests.)

 - Ville


Howard Lewis Ship wrote:
> 
> Identify the fields using XPath instead of id.
> 
> On Sun, Dec 13, 2009 at 11:05 PM, Ville Virtanen
> <vi...@cerion.fi> wrote:
>>
>> Hi,
>>
>> I've googled around but couldn't find solution for this one. The problem
>> is
>> that we have to test a form that is loaded using progressive display
>> which
>> makes all the ids to be generated for each request.
>>
>> Now, how can I use selenium.type to locate the correct input, when the
>> input
>> name changes like this:
>>
>> request one: mpo-1258bc89493_0
>> request two: mpo-1258bcae418_0
>> request three: mpo-1258dfea345_0
>>
>> Has anyone solved this?
>>
>>  - Ville
>> --
>> View this message in context:
>> http://old.nabble.com/Tapestry-5-and-Selenium-tp26773754p26773754.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Tapestry-5-and-Selenium-tp26773754p26779936.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Tapestry 5 and Selenium

Posted by Howard Lewis Ship <hl...@gmail.com>.
Identify the fields using XPath instead of id.

On Sun, Dec 13, 2009 at 11:05 PM, Ville Virtanen
<vi...@cerion.fi> wrote:
>
> Hi,
>
> I've googled around but couldn't find solution for this one. The problem is
> that we have to test a form that is loaded using progressive display which
> makes all the ids to be generated for each request.
>
> Now, how can I use selenium.type to locate the correct input, when the input
> name changes like this:
>
> request one: mpo-1258bc89493_0
> request two: mpo-1258bcae418_0
> request three: mpo-1258dfea345_0
>
> Has anyone solved this?
>
>  - Ville
> --
> View this message in context: http://old.nabble.com/Tapestry-5-and-Selenium-tp26773754p26773754.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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