I'm getting an error in the part red colored... The date will be selected (3 months) and the ARA (SEARCH) button will be clicked...
HTML:
<div id="mCSB_1_container" class="mCSB_container mCS_y_hidden mCS_no_scrollbar_y" style="position:relative; top:0; left:0;" dir="ltr">
<!---->
<a class="filter-singledropselect" href="#" code="0">Bugün</a>
<a class="filter-singledropselect" href="#" code="1">Dün</a>
<a class="filter-singledropselect" href="#" code="365">Son 1 yıl</a><a class="filter-singledropselect" href="#" code="30">Son 1 ay</a>
<a class="filter-singledropselect" href="#" code="7">Son 1 hafta</a>
<a class="filter-singledropselect selected" href="#" code="90">Son 3 ay</a>
<a class="filter-singledropselect" href="#" code="180">Son 6 ay</a>
</div>
XML:
Public Sub cap_Financial_Reported()
Dim connect As New Selenium.ChromeDriver
Dim date As Selenium.WebElement
Dim dates As Selenium.WebElements
Set connect = New Selenium.ChromeDriver
baglan.get "https://www.kap.org.tr/tr/bildirim-sorgu"
connect.Wait 1500
'Notification Criteria
Click on the 'Notification Type menu'
connect.FindElementByXPath("//*[@id='email-form']/div[4]/div[1]/isteven-multi-select/span").Click
connect.Wait 1000
'Select Reporting Type Financial Reports
connect.FindElementByXPath("//*[@id='email-form']/div[4]/div[1]/isteven-multi-select/span/div/div[2]/div[2]/div /label/span").Click
connect.Wait 1000
'Notification Criteria
'Click on the topic menu
connect.FindElementByXPath("//*[@id='email-form']/div[4]/div[4]/isteven-multi-select/span/button").Click
connect.Wait 1000
'Select Notification Type Activity Report
connect.FindElementByXPath("//*[@id='email-form']/div[4]/div[4]/isteven-multi-select/span/div/div[2]/div[2]") .Click
connect.Wait 1000
'Notification Submission Date Criteria
'Date Range (this code is a little different from the others because the element to be clicked is covered by another element. That's why we open it with the code at the beginning
connect.FindElementByXPath ("//*[@id='email-form']/div[6]/div[1]/div[2]/div")
connect.Wait 3000
'Select last 3 months
link.FindElementByXPath ("/html/body/div[7]/div/div/div/div[2]/div[1]/div/div[1]/form/div[6]/div[1]/ div[2]/div/div[1]/div/a[5]")
connect.Wait 1000
Click on the 'SEARCH Button'
connect.FindElementByXPath("//*[@id='email-form']/a[1]").Click
connect.Wait 2000
End Sub