Macro Selenium (Click button and download CSV)

THEKINGSLG

New Member
Joined
Jan 14, 2022
Messages
14
Office Version
  1. 2019
  2. 2016
  3. 2013
  4. 2010
Hey!

I need to click on website button because the name change each month. Bafore the Click, apear a system message to say where i want to download the CSV in my PC.

1642519910564.png


Im trying to do the code and obtain the error 424 (object required) mark in yellow the FindElement(By.XPath row.
1642520144949.png


Sub ClickButton4()

Dim driver As New Selenium.ChromeDriver

With driver
driver.Get "https://trends.google.es/trends/explore?q=MATIC"
Application.Wait (Now + TimeValue("00:00:05"))
.FindElement(By.XPath("//i[@class='material-icons-extended gray']")).Click
End With

Set driver = Nothing

End sub


Some sugestions? When the system message appear i neew set something in my code to indicate whare i want to put the csv?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I have proove this too without succes. Same error:

.FindElement(By.XPath("//i[@class='material-icons-extended gray' and text()='file_download']")).Click
 
Upvote 0

Forum statistics

Threads
1,224,532
Messages
6,179,388
Members
452,908
Latest member
MTDelphis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top