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

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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,215,065
Messages
6,122,945
Members
449,095
Latest member
nmaske

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