How to get Hello text

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to get Hello text

Ankit Singh
Hello All,

Need your help to find-out CSS selection for Hello. Following are HTML. I want to get hello text

<span class="label">
<label for="bundle-option-597722-1032930">Hello</label>
</span>


Thank you in advance 
--
-------------------------------
Cordially --


Ankit Singh
Mobile: +91-8447506507          

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CABdQFgWSN%2BtE3y-kKims74Xr2ByeYwrCyQW2Xz%3D2ko2RgSviOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get Hello text

Shawn McCarthy-2
label[for="bundle-option-597722-1032930"]

On Tuesday, May 30, 2017 at 6:29:20 AM UTC-7, Ankit Singh wrote:
Hello All,

Need your help to find-out CSS selection for Hello. Following are HTML. I want to get hello text

<span class="label">
<label for="bundle-option-597722-1032930">Hello</label>
</span>


Thank you in advance 
--
-------------------------------
Cordially --


Ankit Singh
Mobile: +91-8447506507          

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d597c5b7-8a49-46ae-9167-ab8111d701ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get Hello text

Monika Singhal
In reply to this post by Ankit Singh
Hi,

If you want to get hello text. You can follow the code I have specified below:

driver.findElement(By.xpath("span[@class='label']/label")).getText();

Thanks & Regards,
Monika

On Tuesday, May 30, 2017 at 6:59:20 PM UTC+5:30, Ankit Singh wrote:
Hello All,

Need your help to find-out CSS selection for Hello. Following are HTML. I want to get hello text

<span class="label">
<label for="bundle-option-597722-1032930">Hello</label>
</span>


Thank you in advance 
--
-------------------------------
Cordially --


Ankit Singh
Mobile: +91-8447506507          

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4922001c-d84c-4a21-a8ee-742a399499af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...