deleting elements in selenium

50 views
Skip to first unread message

Griffin Daniel

unread,
May 2, 2022, 3:45:05 AM5/2/22
to Selenium Users
  1. 1 need help deleting an element in selenium without the class name ; The element i need to delete does not have a class name which makes it difficult
My question is how can I delete and element in selenium if I dont have the ID, name, or class
cxz.png
and I have no idea how to delete it.

can someone help me?

-Griffin

Scott Babcock

unread,
May 11, 2022, 2:30:04 AM5/11/22
to Selenium Users
Just search by tag name and href. The image is very small, but you can use a CSS selector to match a part of the href value:
You can find a link with an href attribute that contains "bundle_mbword.css" with this:  By.cssSelector("link[href*='bundle_mbword.css']")
Reply all
Reply to author
Forward
0 new messages