(Nov-19-2021, 05:35 PM)gw1500se Wrote: The page I am loading has javascripts to fill in the page. When I load the page with selenium none of the javascripts are executed.This is wrong or lack in your understating,Selenium will load a full browser with full JavaScript support.
If i should continue some further it would be like this,is not the easiest page to start with as there is lot filling in form to do.
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.keys import Keys from bs4 import BeautifulSoup import time #--| Setup options = Options() #options.add_argument("--headless") browser = webdriver.Chrome(executable_path=r'C:\cmder\bin\chromedriver.exe', options=options) #--| Parse or automation url = "https://www.donotcall.gov/report.html" browser.get(url) time.sleep(3) button_continue = browser.find_elements_by_css_selector('#MainContinueButton') button_continue[0].click() # Continue with fill all the form data time.sleep(3) phone = browser.find_elements_by_css_selector('#PhoneTextBox') phone[0].send_keys("2514455669") date = browser.find_elements_by_css_selector('#DateOfCallTextBox') date[0].click() date_1 = browser.find_elements_by_css_selector('td.ui-datepicker-days-cell-over.ui-datepicker-today > a') date_1[0].click()