0

So I have started messing around with Selenium in python and I am just not able to figure this xpath out.

<div title class="popupBox" style="left: 0px; to p: 490px;">
   <svg class="cp Drag" viewbox="0 0 24 24" style="height: 10px; width: 10px;">...</svg>
   <div title class="eqBox">
      <div title class="ib cp">
         <img title src="src.svg">
         <div title class="bred"></div>
         <div title class="ds2">+1</div>
         <div title class="ds3 IQ">TOP</div>
      </div>
   </div>

I need to be able to locate the TOP and get the result of TOP.

Hopefully that makes sense and I provided what is needed.

1
  • What is known and what is the unknown values here? Is TOP text is known value or ds3 IQ class is known? Commented Oct 23, 2022 at 20:08

1 Answer 1

1

Try:

driver.find_element(By.XPATH, '//*[@class="ds3 IQ"]').text.splitlines[-1]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.