Skip Menu |

This queue is for tickets about the Test-WebDriver CPAN distribution.

Report information
The Basics
Id: 85548
Status: open
Priority: 0/
Queue: Test-WebDriver

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: wish: content_like()
Thanks for this module, Luke! Coming from Test::WWW::Mechanize, I'd like a content_like() method. However, Selenium inefficiently refetches the content each time you use a method such as get_body(). In Mechanize I might do this: $mech->content_like(qr/first/); $mech->content_like(qr/second/); To run more efficiently, I'd this module to support an arrayyref of regexs to check: $TWD->content_like([qr/first/,qr/second/]); That would call get_body() once instead twice, and run the regex's over that. What do you think?
Subject: Re: [rt.cpan.org #85548] wish: content_like()
Date: Wed, 22 May 2013 12:00:47 -0700
To: bug-Test-WebDriver [...] rt.cpan.org
From: Luke Closs <me [...] luk.ec>
Seems like a good idea. We should talk to @obra to see if you can get commit access. Send pull requests to https://github.com/primeradiant/Test-WebDriver On May 22, 2013 8:05 AM, "MARKSTOS via RT" <bug-Test-WebDriver@rt.cpan.org> wrote: Show quoted text
> Wed May 22 14:05:00 2013: Request 85548 was acted upon. > Transaction: Ticket created by MARKSTOS > Queue: Test-WebDriver > Subject: wish: content_like() > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: MARKSTOS@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85548 > > > > Thanks for this module, Luke! > > Coming from Test::WWW::Mechanize, I'd like a content_like() method. > > However, Selenium inefficiently refetches the content each time you use a > method such as get_body(). > > In Mechanize I might do this: > > $mech->content_like(qr/first/); > $mech->content_like(qr/second/); > > To run more efficiently, I'd this module to support an arrayyref of regexs > to check: > > $TWD->content_like([qr/first/,qr/second/]); > > That would call get_body() once instead twice, and run the regex's over > that. > > What do you think? >
Subject: Re: [rt.cpan.org #85548] wish: content_like()
Date: Wed, 22 May 2013 15:54:05 -0400
To: bug-Test-WebDriver [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
On 05/22/2013 03:01 PM, Luke Closs via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=85548 > > > Seems like a good idea. We should talk to @obra to see if you can get > commit access.
Thanks! Earlier this week I became a committer for Selenium::Remote::Driver. I think we really want 4 related methods: # based on Selenium get_body() call text_like() text_unlike() # based on Selenium get_page_source call content_like content_unlike Mark Show quoted text
> > Send pull requests to https://github.com/primeradiant/Test-WebDriver > On May 22, 2013 8:05 AM, "MARKSTOS via RT" <bug-Test-WebDriver@rt.cpan.org> > wrote: >
>> Wed May 22 14:05:00 2013: Request 85548 was acted upon. >> Transaction: Ticket created by MARKSTOS >> Queue: Test-WebDriver >> Subject: wish: content_like() >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: MARKSTOS@cpan.org >> Status: new >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=85548 > >> >> >> Thanks for this module, Luke! >> >> Coming from Test::WWW::Mechanize, I'd like a content_like() method. >> >> However, Selenium inefficiently refetches the content each time you use a >> method such as get_body(). >> >> In Mechanize I might do this: >> >> $mech->content_like(qr/first/); >> $mech->content_like(qr/second/); >> >> To run more efficiently, I'd this module to support an arrayyref of regexs >> to check: >> >> $TWD->content_like([qr/first/,qr/second/]); >> >> That would call get_body() once instead twice, and run the regex's over >> that. >> >> What do you think? >>
>
I've moved this bug to the related GitHub issues queue: https://github.com/primeradiant/Test-WebDriver/issues/4