How to check if the text is high lighted on the webpage...?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to check if the text is high lighted on the webpage...?

javelearner
Hello selenium user, 

Can anyone please share how to check whether the text is highlighted on Webpage or not..? 

I have found the following script... Can anyone please share how it works? Thanks! 

((JavascriptExecutor)driver).executeScript("return window.getSelection().toString();");


--
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/f7d04d77-1b5b-4df3-b988-23ddc257adc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

How to check if the text is high lighted on the webpage...?

Mahmoud Abuzaid
Try to check the xpath with style if it returns true or false

--
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/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to check if the text is high lighted on the webpage...?

javelearner
Thanks for replying can you please elaborate it I didn't get it... Thanks

On Sat, May 5, 2018 at 11:37 AM, Mahmoud Abuzaid <[hidden email]> wrote:
Try to check the xpath with style if it returns true or false

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/hHfkEH0lZiI/unsubscribe.
To unsubscribe from this group and all its topics, 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/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAPFr79ZyHfajO_uMB8S_TbMOyX%2BsXwxXHH%2B4JcxUamnwODdB-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to check if the text is high lighted on the webpage...?

Mahmoud Abuzaid
I need to see your html to help you please quote it here

for example:

//div[@class='foo'][@style='']

On Sunday, May 6, 2018 at 6:06:32 PM UTC+2, Java Learner wrote:
Thanks for replying can you please elaborate it I didn't get it... Thanks

On Sat, May 5, 2018 at 11:37 AM, Mahmoud Abuzaid <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="KvjHn-m4AQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">eng.ma...@...> wrote:
Try to check the xpath with style if it returns true or false

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/selenium-users/hHfkEH0lZiI/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/topic/selenium-users/hHfkEH0lZiI/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/selenium-users/hHfkEH0lZiI/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/selenium-users/hHfkEH0lZiI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="KvjHn-m4AQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="KvjHn-m4AQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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/f660eb05-3001-46f5-9056-e765894afd95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to check if the text is high lighted on the webpage...?

javelearner
thanks a lot Mahmoud!! 

On Wednesday, May 9, 2018 at 8:07:27 AM UTC-5, Mahmoud Abuzaid wrote:
I need to see your html to help you please quote it here

for example:

//div[@class='foo'][@style='']

On Sunday, May 6, 2018 at 6:06:32 PM UTC+2, Java Learner wrote:
Thanks for replying can you please elaborate it I didn't get it... Thanks

On Sat, May 5, 2018 at 11:37 AM, Mahmoud Abuzaid <[hidden email]> wrote:
Try to check the xpath with style if it returns true or false

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/selenium-users/hHfkEH0lZiI/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/topic/selenium-users/hHfkEH0lZiI/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/selenium-users/hHfkEH0lZiI/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/selenium-users/hHfkEH0lZiI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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/82c19267-5697-44fb-8aa4-4868c37adbce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.