0

I am trying to find an element in a webpage.I tried finding it using xpath and cssSelector but I am getting an exception "No such Element Found"

I opened the page 2-3 times and xpath is not changing.Please suggest how to locate this element using selenium webdriver.

<div class="breadcrumb-container breadcrumb-text-last edit-mode" title="Campaign Analytics (DSP)">Campaign Analytics (...</div>

Regards,

1 Answer 1

1

It's quite unclear what is the issue here, but, given what is provided in the question, here are the XPath expressions that should match your element:

//div[@title = 'Campaign Analytics (DSP)']
//div[starts-with(., 'Campaign Analytics')]

Additionally, check that element is not inside an iframe - if yes, switch to the iframe before searching the element. Another possible problem is the timing one - the element is not yet present/loaded when you perform the search - in this case you would need to add an Explicit Wait.

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.