from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
#your executable_path will be different!!
driver = webdriver.Chrome(executable_path="C:/Development/chromedriver.exe")
driver.get("https://www.linkedin.com/jobs/search/?currentJobId=3271146120&f_AL=true&geoId=102257491&keywords=python%20developer&location=London%2C%20England%2C%20United%20Kingdom&refresh=true")
button = driver.find_element(By.XPATH, '/html/body/div[3]/header/nav/div/a[2]')
button.click()
email_field = driver.find_element(By.XPATH, '//*[@id="username"]')
password_field = driver.find_element(By.XPATH, '//*[@id="password"]')
sign_in_field = driver.find_element(By.XPATH, '//*[@id="organic-div"]/form/div[3]/button')
# importing the HTMLSession class
from requests_html import HTMLSession
# create the object of the session
session = HTMLSession()
# url of the page
web_page = 'https://webscraper.io/'
# making get request to the webpage
respone = session.get(web_page)
# getting the html of the page
page_html = respone.html
# finding all divs which have h2 child using xpath
divs_parent_to_h2= page_html.xpath('//div//h2')
# printing the elements list
print(divs_parent_to_h2)Copy Code