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

  • SEARCH
  • Home
  • 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 9124547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:35:47+00:00 2026-06-17T06:35:47+00:00

I have created a list of elements matching an xpath and would like to

  • 0

I have created a list of elements matching an xpath and would like to click through each successively. However, if I use the get_attribute("href") command I get a ‘unicode’ object has no attribute ‘click’ error. This is because href is a string. If I don’t use get_attribute and simply use this command:

driver.find_elements_by_xpath(".//div/div/div[3]/table//tr[12]/td/table//tr/td/a")

I get a list full of elements. I can successfully click on the first link in the list; however, when I click on the second I get this error: ‘Element not
found in the cache – perhaps the page has changed since it was looked up’

I imagine that the reason that the page links I am trying to iterate through are generated via a search query into java (this is one of the href links:

javascript:__doPostBack('ctl00$Content$listJobsByAll1$GridView2','Page$3') )

One more piece of relevant information: there are only two attributes at this xpath location: href and the text.

So, given that I am dealing with a java website and only the two attributes, I am hoping someone can tell me which webdriver commands I can use to get a series of clickable static links. Beyond a specific answer, any advice on how I could have figured this out myself would be helpful.

  • 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-06-17T06:35:49+00:00Added an answer on June 17, 2026 at 6:35 am

    if you click on a link with selenium, you are changing the current page. The page that you are directed to doesn’t have the next element.

    to get links use:

    './/tag/@href'
    

    you can try:

    for elem in elems:
        elem.click()
        print browser.current_url
        browser.back()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two lists with 8 list elements within each one. I would like
I have created a repeat control that list some documents. I would like to
I have created a custom list view, each row has it's own custom selector,
I have created a specific List which exists out of the following elements to
I have four tabs created by a piece of coding and I would like
I have created an inner join criteria to show a list of elements in
Hi I have created a List of Objects. Each object contains a Set. I
So I have a horizontal navigation bar I created by floating the list elements
Form contains two dropdown lists created using code below. Both dropdown list elements have
i have created list of elements. if one element is highlighted (using buttons 'prev'

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.