0

I used the following code to be able to click on the job link on the C # code but it couldn't find it.

C#:

   1. driver.FindElement(By.PartialLinkText("Jobs List")).Click();
   2. driver.FindElement(By.CssSelector("a[href*='jobs']")).Click();
   3. driver.FindElement(By.XPath("(//a[@href='/jobs'])")).Click();

HTML:

<a href="/jobs" class="pr-0 pl-1 left-menu-item v-list-item v-list-item--link theme--light" tabindex="0">
    <div class="v-list-item__icon">
        <i aria-hidden="true" class="v-icon notranslate mdi mdi-credit-card-multiple theme--light white--text"></i>
    </div>
    <div class="v-list-item__title">Jobs List</div>
</a>

Please help me. Thank you.

1 Answer 1

1

Your locator seems correct. If you are encountering "No Such Element Exception", try to add implicit wait driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);

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.