Hello All,
Thanks for the help so far. I still face a problem to retrieve the
next info ('Test Analyst Load Runner', 'Fri 11 Sep', 'Excellent 12
Month fixed Term role for a Test Analyst with strong Load Runner
Experience - One of the largest testing teams in Brisbane is
expanding' and 'Hudson') from the next html:
I would like to create a list of all jobs from a given page (there are
~20 links per page) so this is just example values.
<div id=resultsList class=><ol id="searchResultsList"><li><span
class="jobsearchNumber">1<input type="checkbox" name="chkJob"
onClick="UpdateSelectedItems();" value="15998998"></input></
span><div><h2><a href="/job/b-test-b-b-analyst-b-load-runner/brisbane/
15998998/"><span class="highlight">Test Analyst</span> Load Runner</
a>
<em>Hudson</em></h2><span
class="jobSearchJobListedDate">Fri 11 Sep</span><div><p>Excellent 12
Month fixed Term role for a Test Analyst with strong Load Runner
Experience - One of the largest testing teams in Brisbane is
expanding.</p><span class="taxonomy"><a href="javascript:ClassTree
('catindustry=1215')">I.T. & T</a> > <a
href="javascript:ClassTree
('catoccupation=1491&catindustry=1215')">QA/Testers</a></span></
div><h3>Brisbane</h3><h3></h3></div></li><li><span
class="jobsearchNumber">2<input type="checkbox" name="chkJob"
onClick="UpdateSelectedItems();" value="15995612"></input></
span><div><h2><a href="/job/b-test-b-b-analyst-b/brisbane/
15995612/"><span class="highlight">Test Analyst</span></a>
<em>Beyond Recruitment Pty Ltd</em></
h2><span class="jobSearchJobListedDate">Fri 11 Sep</span><div><p>Test
Analyst contract opportunity at a leading company based in Brisbane
CBD</p><span class="taxonomy"><a href="javascript:ClassTree
('catindustry=1215')">I.T. & T</a> > <a
href="javascript:ClassTree
('catoccupation=1491&catindustry=1215')">QA/Testers</a></span></
div><h3>Brisbane</h3><h3></h3></div></li><li><span
class="jobsearchNumber">3<input type="checkbox" name="chkJob"
onClick="UpdateSelectedItems();" value="15956235"></input></
span><div><h2><a href="/job/peoplesoft-b-test-b-b-analyst-b/brisbane/
15956235/">PEOPLESOFT <span class="highlight">TEST ANALYST</span></a>
<em>Integrated Business Technologies Pty
Ltd</em></h2><span class="jobSearchJobListedDate">Fri 04 Sep</
span><div><p>Immediate requirement for an experienced PeopleSoft test
analyst across HR/Payroll</p><span class="taxonomy"><a
href="javascript:ClassTree('catindustry=1215')">I.T. & T</a> >
<a href="javascript:ClassTree
('catoccupation=1491&catindustry=1215')">QA/Testers</a></span></
div><h3>Brisbane</h3><h3></h3></div></li><li><span
Cheers,
Guy
On Sep 11, 6:14 pm, Wesley Chen <[email protected]> wrote:
> For the comment below:
> $ie.element_by_xpath("//img[contains(@src, 'report_delete.png')]").click
> It can locate an image element, which has src attributes, for the
> "report_delete.png" is just part of the src.
>
> I think it can help you.
>
> Thanks.
> Wesley Chen.
>
>
>
> On Fri, Sep 11, 2009 at 6:03 PM, Guy <[email protected]> wrote:
>
> > Hello Orde,
>
> > It sure works but I should have ask my question better.
>
> > The "peoplesoft-b-test-b-b- analyst-b/brisbane" can't be hard coded
> > into the xpath as it changes.
>
> > is there a way to use regexpr in the xpath? I think that /job/ is
> > always returns.
>
> > Cheers,
>
> > Guy
>
> > On Sep 11, 9:26 am, orde <[email protected]> wrote:
> > > You should take a look athttp://wiki.openqa.org/display/WTR/XPath.
>
> > > Something like this should work:
>
> > > puts browser.link(:xpath,"//a...@href='/job/peoplesoft-b-test-b-b-
> > > analyst-b/brisbane/15956235/']/").text
>
> > > Hope it helps.
>
> > > On Sep 10, 8:32 am, Guy <[email protected]> wrote:
>
> > > > Hi Orde,
>
> > > > It is very helpful and I already put that in my script.
> > > > I would appreciate help with the next (xpath)
>
> > > > I try to get the "PEOPLESOFT TEST ANALYST" and the date 'Fri 04 Sep'
> > > > using xpath without getting the right value. Any ideas would be
> > > > welcome.
>
> > > > <div id=resultsList class=><ol id="searchResultsList"><li><span
> > > > class="jobsearchNumber">1<input type="checkbox" name="chkJob"
> > > > onClick="UpdateSelectedItems();" value="15956235"></input></
> > > > span><div><h2><a href="/job/peoplesoft-b-test-b-b-analyst-b/brisbane/
> > > > 15956235/">PEOPLESOFT <span class="highlight">TEST ANALYST</span></a>
> > > > <em>Integrated Business Technologies Pty
> > > > Ltd</em></h2><span class="jobSearchJobListedDate">Fri 04 Sep</
> > > > span><div><p>Immediate requirement for an experienced PeopleSoft test
> > > > analyst across HR/Payroll</p><span class="taxonomy"><a
> > > > href="javascript:ClassTree('catindustry=1215')">I.T. & T</a> >
> > > > <a href="javascript:ClassTree
> > > > ('catoccupation=1491&catindustry=1215')">QA/Testers</a></span></
> > > > div><h3>Brisbane</h3><h3></h3></div></li><li><span
>
> > > > Many Thanks,
>
> > > > Guy
>
> > > > On Sep 10, 2:21 am, orde <[email protected]> wrote:
>
> > > > > This will give you the number of links:
>
> > > > > browser = [your browser of choice]
>
> > > > > puts browser.links.length
>
> > > > > -------
>
> > > > > To create the loop:
>
> > > > > while browser.image(:src, /bullet_search_white_small.gif/).exists?
> > > > > puts 'exists'
> > > > > sleep 2
> > > > > browser.refresh
> > > > > end
>
> > > > > Hope that helps.
>
> > > > > orde
>
> > > > > On Sep 9, 7:56 am, Guy <[email protected]> wrote:
>
> > > > > > Hello All,
>
> > > > > > I'm New with watir but appreciate how good it is.
> > > > > > I'm looking for a way to count all PageTo(*) elements or to loop
> > until
> > > > > > the bullet_search_white_small.gif ('Next' image) doesn't exist in
> > the
> > > > > > page
> > > > > > Follows is the html code from the site
> > > > > > <div class='searchPagination'><dl class='jobSearchPagination'>
> > > > > > <a class='nextPage btn pinkbtn_small' href="javascript: PageTo
> > > > > > (4)"><strong>Next<img src='/general_ID_items/images/other/
> > > > > > bullet_search_white_small.gif'></strong></a><dt>Page</dt>
> > > > > > <dd><a href="javascript: PageTo(1)">1</a></dd>
> > > > > > <dd><a href="javascript: PageTo(2)">2</a></dd><dd
> > > > > > class='currentPage'><span>3</span></dd>
> > > > > > <dd><a href="javascript: PageTo(4)">4</a></dd>
> > > > > > <dd><a href="javascript: PageTo(5)">5</a></dd>
> > > > > > <dd><a href="javascript: PageTo(6)">6</a></dd>
> > > > > > <dd><a href="javascript: PageTo(7)">7</a></dd>
> > > > > > <dd><a href="javascript: PageTo(8)">8</a></dd>
> > > > > > <dd><a href="javascript: PageTo(9)">9</a></dd>
> > > > > > <dd><a href="javascript: PageTo(10)">10</a></dd></dl></div>
> > > > > > </div>
> > > > > > Cheers,
> > > > > > Guy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---