How to get the values - "ipad,iPod" using "xpath:" concept?

Please find the part of an `html` :

       <ul id="globalnav" role="navigation">
        <li id="gn-apple"><a href="/"><span>Apple</span></a></li>
        <li id="gn-store"><a
href="http://store.apple.com/"><span>Store</span></a></li>
        <li id="gn-mac"><a href="/mac/"><span>Mac</span></a></li>
        <li id="gn-ipod"><a href="/ipod/"><span>iPod</span></a></li>
        <li id="gn-iphone"><a
href="/iphone/"><span>iPhone</span></a></li>
        <li id="gn-ipad"><a href="/ipad/"><span>iPad</span></a></li>
        <li id="gn-itunes"><a
href="/itunes/"><span>iTunes</span></a></li>
        <li id="gn-support" class="gn-last"><a
href="/support/"><span>Support</span></a></li>
      </ul>

Can we get the values `ipad,iPod` using `Selenium-webdriver-xpath`
concept?

Thanks,

···

--
Posted via http://www.ruby-forum.com/.

It's not clear what you want to use a selection criteria. Is it

- the text
- the tag's name
- an attribute value
- an attribute's name
- a combination

?

Cheers

robert

···

On Fri, Jan 25, 2013 at 12:17 PM, Arup Rakshit <lists@ruby-forum.com> wrote:

Please find the part of an `html` :

       <ul id="globalnav" role="navigation">
        <li id="gn-apple"><a href="/"><span>Apple</span></a></li>
        <li id="gn-store"><a
href="http://store.apple.com/&quot;&gt;&lt;span&gt;Store&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
        <li id="gn-mac"><a href="/mac/"><span>Mac</span></a></li>
        <li id="gn-ipod"><a href="/ipod/"><span>iPod</span></a></li>
        <li id="gn-iphone"><a
href="/iphone/"><span>iPhone</span></a></li>
        <li id="gn-ipad"><a href="/ipad/"><span>iPad</span></a></li>
        <li id="gn-itunes"><a
href="/itunes/"><span>iTunes</span></a></li>
        <li id="gn-support" class="gn-last"><a
href="/support/"><span>Support</span></a></li>
      </ul>

Can we get the values `ipad,iPod` using `Selenium-webdriver-xpath`
concept?

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

There are a lot of ruby tools that can do that. Nokogiri can do it easily. Watch this: #190 Screen Scraping with Nokogiri - RailsCasts

Panagiotis (atmosx) Atmatzidis

email: atma@convalesco.org
URL: http://www.convalesco.org
GnuPG ID: 0xE736C6A0
gpg --keyserver x-hkp://pgp.mit.edu --recv-keys 0xE736C6A0

···

On 25 Ιαν 2013, at 12:17 , Arup Rakshit <lists@ruby-forum.com> wrote:

Please find the part of an `html` :

      <ul id="globalnav" role="navigation">
       <li id="gn-apple"><a href="/"><span>Apple</span></a></li>
       <li id="gn-store"><a
href="http://store.apple.com/&quot;&gt;&lt;span&gt;Store&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
       <li id="gn-mac"><a href="/mac/"><span>Mac</span></a></li>
       <li id="gn-ipod"><a href="/ipod/"><span>iPod</span></a></li>
       <li id="gn-iphone"><a
href="/iphone/"><span>iPhone</span></a></li>
       <li id="gn-ipad"><a href="/ipad/"><span>iPad</span></a></li>
       <li id="gn-itunes"><a
href="/itunes/"><span>iTunes</span></a></li>
       <li id="gn-support" class="gn-last"><a
href="/support/"><span>Support</span></a></li>
     </ul>

Can we get the values `ipad,iPod` using `Selenium-webdriver-xpath`
concept?

Thanks,

--
Posted via http://www.ruby-forum.com/\.

--
The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."

Robert Klemme wrote in post #1093735:

It's not clear what you want to use a selection criteria. Is it

- the text
- the tag's name
- an attribute value
- an attribute's name
- a combination

?

I want to get the values as mentioned in the subject using `xpath` with
selenium-webdriver. Any logic is fine,but need to extract the fields
information's.

···

--
Posted via http://www.ruby-forum.com/\.

That does not answer my questions. You want to get those values based
on _what_? As long as you do not describe the criteria I will happily
implement

def get; %w{ipad iPod} end

Cheers

robert

···

On Fri, Jan 25, 2013 at 12:39 PM, Arup Rakshit <lists@ruby-forum.com> wrote:

Robert Klemme wrote in post #1093735:

It's not clear what you want to use a selection criteria. Is it

- the text
- the tag's name
- an attribute value
- an attribute's name
- a combination

?

I want to get the values as mentioned in the subject using `xpath` with
selenium-webdriver. Any logic is fine,but need to extract the fields
information's.

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Robert Klemme wrote in post #1093743:

?

Here is my answer

It's not clear what you want to use a selection criteria. Is it

- the text
- the tag's name (yes)
- an attribute value(yes)
- an attribute's name(yes)
- a combination(yes)

Please help.

···

On Fri, Jan 25, 2013 at 12:39 PM, Arup Rakshit <lists@ruby-forum.com> > wrote:

--
Posted via http://www.ruby-forum.com/\.