简体   繁体   中英

How to find whether some text is highlighted and underlined on a webpage with Selenium(Java/Python)?

How to find whether some text is highlighted and underlined on a webpage with Selenium(Java/Python)?

I came across above question in my recent interview. Could anyone answer if knows? Thanks in advance.

By Checking the Style Attribute (text-decoration) you can understand if that word is underlined or not. And for highlight you can check for particular css style or "<mark> *** </mark>" tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM