FAQ
Hi All,

Can any body help to knw whether we can find the xpath by using src tag of
a homepage logo of the URL : http://www.meritnation.com/ ,i m trying in
IDE ie xpath : //img[@src='/img/logo/new_logo.jpg'] but its not working...

but if i m recording it from Selenium Ide i getting 2 n 3 option:-

1)css=img[title="meritnation.com - now school is easy"]
2)//img[@title='meritnation.com - now school is easy']

help me

i m attaching the screenshot for better reference.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/hm1PNVp9foUJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Mark Collin at Jul 18, 2012 at 8:17 am
    A picture that shows no markup is useless for helping you to determine a
    valid XPath.



    An XPath of //img[@src='/img/logo/new_logo.jpg'] looks sane, I would expect
    it to work if you have entered the path correctly. The only place where
    this may go wrong is if the browser decides to prepend the domain to the src
    (I think IE used to do this at some point in the past, not sure if they
    still do). You would be safer using one of the options IDE has suggested.







    From: selenium-users@googlegroups.com
       On Behalf Of snigdha narain
    Sent: 18 July 2012 09:11
    To: selenium-users@googlegroups.com
    Subject: [selenium-users] want to use the xpath by using src tag



    Hi All,



    Can any body help to knw whether we can find the xpath by using src tag of a
    homepage logo of the URL : http://www.meritnation.com/ ,i m trying in IDE
    ie xpath : //img[@src='/img/logo/new_logo.jpg'] but its not working...



    but if i m recording it from Selenium Ide i getting 2 n 3 option:-



    1)css=img[title="meritnation.com - now school is easy"]

    2)//img[@title='meritnation.com - now school is easy']



    help me



    i m attaching the screenshot for better reference.

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/selenium-users/-/hm1PNVp9foUJ.
    For more options, visit https://groups.google.com/groups/opt_out.



    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Krishnan Mahadevan at Jul 18, 2012 at 8:24 am
    Snigdha,
    replace

    //img[@src='/img/logo/new_logo.jpg']

    with

    //img[contains(@src,'/img/logo/new_logo.jpg')]

    You should be good.



    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/

    On Wed, Jul 18, 2012 at 1:41 PM, snigdha narain wrote:

    Hi All,

    Can any body help to knw whether we can find the xpath by using src tag of
    a homepage logo of the URL : http://www.meritnation.com/ ,i m trying in
    IDE ie xpath : //img[@src='/img/logo/new_logo.jpg'] but its not working...

    but if i m recording it from Selenium Ide i getting 2 n 3 option:-

    1)css=img[title="meritnation.com - now school is easy"]
    2)//img[@title='meritnation.com - now school is easy']

    help me

    i m attaching the screenshot for better reference.

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/selenium-users/-/hm1PNVp9foUJ.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Peter Gale at Jul 18, 2012 at 8:45 am
    You need to match on the full src value, including the http:// bit ... not just part of it ...

    Unless you use the Xpath contains function, like: //img[contains(@src,'/img/logo/new_logo.jpg')]

    Date: Wed, 18 Jul 2012 01:11:02 -0700
    From: snigdha.narain@gmail.com
    To: selenium-users@googlegroups.com
    Subject: [selenium-users] want to use the xpath by using src tag

    Hi All,
    Can any body help to knw whether we can find the xpath by using src tag of a homepage logo of the URL : http://www.meritnation.com/ ,i m trying in IDE ie xpath : //img[@src='/img/logo/new_logo.jpg'] but its not working...
    but if i m recording it from Selenium Ide i getting 2 n 3 option:-
    1)css=img[title="meritnation.com - now school is easy"]2)//img[@title='meritnation.com - now school is easy']
    help me
    i m attaching the screenshot for better reference.



    --

    You received this message because you are subscribed to the Google Groups "Selenium Users" group.

    To post to this group, send email to selenium-users@googlegroups.com.

    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/hm1PNVp9foUJ.

    For more options, visit https://groups.google.com/groups/opt_out.






    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Snigdha narain at Jul 18, 2012 at 9:30 am
    Peter n krishnan thanks a ton! its working...
    On Wednesday, July 18, 2012 1:41:02 PM UTC+5:30, snigdha narain wrote:

    Hi All,

    Can any body help to knw whether we can find the xpath by using src tag of
    a homepage logo of the URL : http://www.meritnation.com/ ,i m trying in
    IDE ie xpath : //img[@src='/img/logo/new_logo.jpg'] but its not working...

    but if i m recording it from Selenium Ide i getting 2 n 3 option:-

    1)css=img[title="meritnation.com - now school is easy"]
    2)//img[@title='meritnation.com - now school is easy']

    help me

    i m attaching the screenshot for better reference.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/7w7HkDKIiocJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Smartmouse at Oct 8, 2013 at 8:16 am
    Hello, i need help about XPath syntax that i have to use with Wordpress
    (FeedWordpress plugin).

    I have this RSS link:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <rss version="2.0" xml:lang="en-US">
      <channel>
       <title>MySite</title>
       <link>http://www.mysite.com/index.php</link>
       <description><![CDATA[Live information from MySite]]></description>
       <item>
        <title><![CDATA[This is a test]]></title>
        <link>http://www.mysite.com/index.php/topic,13177.0.html</link>
        <description>
    <![CDATA[<img src="http://s10.postimg.org/5zbyeuugp/testing2453.jpg" alt="" class="bbc_img" />

    I'm testingTesting this right now]]>
        </description>
        <author>itsme@email.com</author>
        <comments>http://www.mysite.com/index.php?action=post;topic=13177.0</comments>
        <category><![CDATA[That section]]></category>
        <pubDate>Tue, 01 Oct 2013 22:26:56 GMT</pubDate>
        <guid>http://www.mysite.com/index.php/topic,13177.0.html</guid>
       </item>

    How to catch <img src="..."> string with XPath-like syntax?
    How to fill the "Value" field?

    This is the FeedWordpress feature i'm talking about:
    http://img822.imageshack.us/img822/2333/5sw9.png

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/28a4ca96-68d7-481a-be91-ddbd62b95447%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedJul 18, '12 at 8:16a
activeOct 8, '13 at 8:16a
posts6
users5
websiteseleniumhq.org

People

Translate

site design / logo © 2022 Grokbase