Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6565935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:09:23+00:00 2026-05-25T14:09:23+00:00

I have a HTML code like this: <div class=links nopreview><span><a class=csiAction href=/WebAccess/home.html#URL=centric://REFLECTION/INSTANCE/_CS_Data/null>Home</a></span>&nbsp;•&nbsp;<span><span><a class=csiAction href=/WebAccess/home.html#URL=centric://SITEADMIN/_CS_Site>Setup</a></span>&nbsp;•&nbsp;</span><span><a

  • 0

I have a HTML code like this:

<div class="links nopreview"><span><a class="csiAction"
href="/WebAccess/home.html#URL=centric://REFLECTION/INSTANCE/_CS_Data/null">Home</a></span>&nbsp;•&nbsp;<span><span><a class="csiAction"
href="/WebAccess/home.html#URL=centric://SITEADMIN/_CS_Site">Setup</a></span>&nbsp;•&nbsp;</span><span><a
title="Sign Out" class="csiAction csiActionLink">Sign Out</a></span></div>

I would like to click on the link that has the text Home. As this Home link appears after login, I have a code like this:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import re

browser = webdriver.Firefox() # Get local session of firefox
browser.get("http://myServer/WebAccess/login.html") # Load App page
elem = browser.find_element_by_name("LoginID") # Find the Login box
elem.send_keys("Administrator")
elem = browser.find_element_by_name("Password") # Find the Password box
elem.send_keys("Administrator" + Keys.RETURN)
#try:
elem = browser.find_element_by_link_text("Home")
elem.click()

The part till login works great. However the last but one line is problematic

elem = browser.find_element_by_link_text("Home")

It raises this NoSuchElementException where the Home link is there as you can see from the HTML code.

raise exception_class(message, screen, stacktrace)
NoSuchElementException: Message: u'Unable to locate element: {"method":"link text","selector":"Home"}' 

Any guidance as to what I am doing wrong, please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:09:24+00:00Added an answer on May 25, 2026 at 2:09 pm

    Have you tried adding an implicit wait to this so that it waits instead of running to quickly.

    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys
    import re
    
    browser = webdriver.Firefox() # Get local session of firefox
    
    browser.implicitly_wait(10) #wait 10 seconds when doing a find_element before carrying on
    
    browser.get("http://myServer/WebAccess/login.html") # Load App page
    elem = browser.find_element_by_name("LoginID") # Find the Login box
    elem.send_keys("Administrator")
    elem = browser.find_element_by_name("Password") # Find the Password box
    elem.send_keys("Administrator" + Keys.RETURN)
    #try:
    elem = browser.find_element_by_link_text("Home")
    elem.click()
    

    The implicitly_wait call makes the browser poll until the item is on the page and visible to be interacted with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have jquery code like this: html += '<div class=index>' + item.index +
I have HTML code like this : <div> <a>Link A1</a> <a>Link A2</a> <a>Link A3</a>
I have html code that looks roughly like this: <div id=id1> <div id=id2> <p>some
I have html code like this <tr class=odd> <td><b>Reason for Termination:</b></td> <td>this has bunch
I have code like this: string uriString = @C:\Temp\test.html; Uri uri = new Uri(uriString);
Let's say I have some code like this: <html> <head><title>Title</title></head> <body> <?php if (!$someCondition){
I have the following html code: <h3 id=headerid><span onclick=expandCollapse('headerid')>&uArr;</span>Header title</h3> I would like to
I have index.php like this: <script type=text/javascript src=jquery-1.4.2.js></script> <script type=text/javascript src=ajax.js></script> <a href='one.php' class='ajax'>One</a>
I have a html structure like this : <div id=nav_holder style=position:absolute;border-radius:400px;width:0px;height:0px;background-color:#460203;z-index:350px;> <div id=inner_wrap> </div>
I have a view_mine_and_others.php file that outputs this html <div class=rec id=1> <div class=val>343</div>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.