I am trying to select "Custom range" in the date selector of this site: https://niftygateway.com/sitewide-activity
I have written the following code to make Selenium click on "Right now":
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
import time
webdriver = webdriver.Chrome(ChromeDriverManager().install()) #executable_path=chromedriver_path
time.sleep(2)
webdriver.get('https://niftygateway.com/sitewide-activity')
time.sleep(3)
date_selector = webdriver.find_element_by_xpath('//*[@id="root"]/div/div/div[1]/div[2]/div/div/button/span')
date_selector.click()
But after this, how do I make it click on "Custom range"? When I "inspect element" I cannot see anything change in the path upon selecting "Custom range". So I am not able to find a way to automate a click on "Custom range".
Furthermore, how do I make it select a date range, say Nov 1 or Nov 5? Because when I select a custom date range myself, again nothing in the xpath or URL changes, so I am not sure how to automate this.