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

瀏覽次數:36 次
跳到第一則未讀訊息

javel...@gmail.com

未讀,
2018年5月5日 上午10:11:432018/5/5
收件者:Selenium Users
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();");


Mahmoud Abuzaid

未讀,
2018年5月6日 清晨6:22:452018/5/6
收件者:Selenium Users
Try to check the xpath with style if it returns true or false

Java Learner

未讀,
2018年5月6日 中午12:06:322018/5/6
收件者:seleniu...@googlegroups.com
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 <eng.ma...@gmail.com> 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 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/14d8c207-4791-434b-a4b1-74fa2c726bc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mahmoud Abuzaid

未讀,
2018年5月9日 上午9:07:272018/5/9
收件者:Selenium Users
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 <eng.ma...@gmail.com> 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 selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

javel...@gmail.com

未讀,
2018年5月9日 下午2:23:132018/5/9
收件者:Selenium Users
thanks a lot Mahmoud!! 
回覆所有人
回覆作者
轉寄
0 則新訊息