Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web scrap --Need help
#1
Hi.
I got a weblink which have below:
I use a selenium to webscrap , intending to click on the downloadALLChart, but i not sure how to do it
Thanks

my code
driver.find_elements(By.CLASS_NAME, 'btn-primary')


<button class="btn btn-primary" data-bind="visible: is_standard, click: downloadALLChart, attr: { disabled: working() }" style="margin-bottom: 10px;">
<span data-bind="visible: !working()" style="">Download All Chart</span>
<span data-bind="visible: working()" style="display: none;">please wait</span>
</button>
Reply
#2
Like this.
bt = driver.find_elements(By.CLASS_NAME, 'btn-primary')
bt.click()
Reply
#3
(Sep-30-2023, 02:07 PM)snippsat Wrote: Like this.
bt = driver.find_elements(By.CLASS_NAME, 'btn-primary')
bt.click()

Thanks
It retrurn
bt.click()
AttributeError: 'list' object has no attribute 'click'
Reply
#4
Try:
bt = driver.find_elements(By.CLASS_NAME, 'btn-primary')
bt[0].click()
Lizardpython likes this post
Reply
#5
(Oct-01-2023, 09:09 AM)snippsat Wrote: Try:
bt = driver.find_elements(By.CLASS_NAME, 'btn-primary')
bt[0].click()


Thank you.It works ..
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I tried every way to scrap morningstar financials data without success so far sparkt 2 8,273 Oct-20-2020, 05:43 PM
Last Post: sparkt
  Web scrap multiple pages anilacem_302 3 3,857 Jul-01-2020, 07:50 PM
Last Post: mlieqo
  Need logic on how to scrap 100K URLs goodmind 2 2,638 Jun-29-2020, 09:53 AM
Last Post: goodmind
  Scrap a dynamic span hefaz 0 2,706 Mar-07-2020, 02:56 PM
Last Post: hefaz
  scrap by defining 3 functions zarize 0 1,863 Feb-18-2020, 03:55 PM
Last Post: zarize
  Skipping anti-scrap zarize 0 1,887 Jan-17-2020, 11:51 AM
Last Post: zarize
  Cannot get selenium to scrap past the first two pages newbie_programmer 0 4,169 Dec-12-2019, 06:19 AM
Last Post: newbie_programmer
  Scrap data from not standarized page? zarize 4 3,331 Nov-25-2019, 10:25 AM
Last Post: zarize
  page impossible to scrap? :O zarize 2 3,956 Oct-03-2019, 02:44 PM
Last Post: zarize
  Scrap a value from website harsush 1 2,293 Aug-29-2019, 01:57 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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