Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get link and link text from table
#3
i did copy the xpath from the table to get:
//*[@id="MainContentPlaceholder_RightColumnPlaceholder_RightColumnPlaceHolder_AssignedTrainingGridview_EnrolledCoursesGridview"]
But it didnt catch it


In what circumstances does this fail
btn = driver.find_element_by_xpath('//*[@id="MainContentPlaceholder_RightColumnPlaceholder_RightColumnPlaceHolder_AssignedTrainingGridview_EnrolledCoursesGridview_ModuleButton_0"]')
btn.click()
but this works?
self.browser.execute_script("document.getElementsByClassName('btn btn-med lime-no-shadow module-button')[0].click()")
Quote:
<a id="MainContentPlaceholder_RightColumnPlaceholder_RightColumnPlaceHolder_AssignedTrainingGridview_EnrolledCoursesGridview_ModuleButton_0" class="btn btn-med lime-no-shadow module-button" href="/Learning/CourseViewer.aspx?id=479561544">Take Now</a>

It appears that on this site, only executing javascript works
Recommended Tutorials:
Reply


Messages In This Thread
get link and link text from table - by metulburr - Jun-12-2019, 10:53 PM
RE: get link and link text from table - by snippsat - Jun-13-2019, 01:05 AM
RE: get link and link text from table - by metulburr - Jun-13-2019, 03:50 AM
RE: get link and link text from table - by snippsat - Jun-13-2019, 09:13 AM
RE: get link and link text from table - by snippsat - Jun-13-2019, 07:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Scraping links and table from link cartonics 11 1,811 Oct-12-2023, 06:42 AM
Last Post: cartonics
  Link implementation JonWayn 4 1,970 Aug-31-2022, 12:17 PM
Last Post: Larz60+
  How to find link to video file from URL Pavel_47 38 11,729 Jun-28-2022, 10:55 AM
Last Post: Pavel_47
  Download a link that re-directs to a login page justanotherpythonnoob 1 2,772 Oct-23-2020, 03:27 PM
Last Post: Aspire2Inspire
  Short link URL Evil_Patrick 5 3,197 Jul-10-2020, 10:14 AM
Last Post: steve_shambles
  Selenium won't open a link Justin2444 2 5,924 Apr-07-2020, 09:46 AM
Last Post: Larz60+
  How find link element zinho 3 3,209 Mar-31-2020, 12:29 PM
Last Post: snippsat
  SHow image in a static link of Django pycada 3 2,618 Mar-04-2020, 01:50 AM
Last Post: pycada
  Scrap text out of td table from URLS Gochix2020 4 5,774 Aug-03-2019, 02:56 AM
Last Post: Larz60+
  LINK Gabriela 3 57,614 May-01-2019, 02:32 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020