I wanted to train selenium and scratch some information on website: https://www.stepstone.at/?gclid=CjwKCAiApNSABhAlEiwANuR9YAJKRjy_7hDuKPpJRL-zfaqDqc2zlAo9EgGmRHgs1Bvx5WRu_3ZPkBoC9_cQAvD_BwE&&ef_id=CjwKCAiApNSABhAlEiwANuR9YAJKRjy_7hDuKPpJRL-zfaqDqc2zlAo9EgGmRHgs1Bvx5WRu_3ZPkBoC9_cQAvD_BwE:G:s&cid=SEAdvert_Google_SEARCH_AT_Gen-E_c_Jobs_jobs_FPd_EtaId4-L1&loc_interest=&loc_physical=1000852&s_kwcid=AL!524!3!494891721515!e!!g!!jobs
This is my code:
search_job = input("Write your job that you are searching for: ")
search_city = input("Write your city where you want to find your job: ")
search_working_times = input("Write your working times: ")
PATH = "C:\Program Files\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("https://www.stepstone.at/?gclid=CjwKCAiApNSABhAlEiwANuR9YAJKRjy_7hDuKPpJRL-zfaqDqc2zlAo9EgGmRHgs1Bvx5WRu_3ZPkBoC9_cQAvD_BwE&&ef_id=CjwKCAiApNSABhAlEiwANuR9YAJKRjy_7hDuKPpJRL-zfaqDqc2zlAo9EgGmRHgs1Bvx5WRu_3ZPkBoC9_cQAvD_BwE:G:s&cid=SEAdvert_Google_SEARCH_AT_Gen-E_c_Jobs_jobs_FPd_EtaId4-L1&loc_interest=&loc_physical=1000852&s_kwcid=AL!524!3!494891721515!e!!g!!jobs")
driver.implicitly_wait(5)
your_competence = driver.find_element_by_name("ke")
your_competence.send_keys(search_job)
your_city = driver.find_element_by_name("ws")
your_city.send_keys(search_city)
if "Vollzeit" == search_working_times:
vollzeit = driver.find_element_by_id("ch1").click()
When i run this code anything else except the click in the button the console displays the following error:
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input class="quickfilters__list-item-checkbox" type="checkbox" name="wt" value="80001" id="ch1"> is not clickable at point (21, 307). Other element would receive the click: <section class="prompt-container">...</section>
(Session info: chrome=88.0.4324.104)
Could someone pls help me with this :)
I replicated your code and it looks like this is happening because of the pop up window with terms and rules. Just add driver.find_element_by_id("ccmgt_explicit_accept").click()
to your code before trying to use page. With code like this all worked good:
search_job = input("Write your job that you are searching for: ")
search_city = input("Write your city where you want to find your job: ")
search_working_times = input("Write your working times: ")
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get(
"https://www.stepstone.at/?gclid=CjwKCAiApNSABhAlEiwANuR9YAJKRjy_7hDuKPpJRL-zfaqDqc2zlAo9EgGmRHgs1Bvx5WRu_3ZPkBoC9_cQAvD_BwE&&ef_id=CjwKCAiApNSABhAlEiwANuR9YAJKRjy_7hDuKPpJRL-zfaqDqc2zlAo9EgGmRHgs1Bvx5WRu_3ZPkBoC9_cQAvD_BwE:G:s&cid=SEAdvert_Google_SEARCH_AT_Gen-E_c_Jobs_jobs_FPd_EtaId4-L1&loc_interest=&loc_physical=1000852&s_kwcid=AL!524!3!494891721515!e!!g!!jobs")
driver.implicitly_wait(5)
driver.find_element_by_id("ccmgt_explicit_accept").click()
your_competence = driver.find_element_by_name("ke")
your_competence.send_keys(search_job)
your_city = driver.find_element_by_name("ws")
your_city.send_keys(search_city)
if "Vollzeit" == search_working_times:
vollzeit = driver.find_element_by_id("ch1").click()
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments