Open
Description
hey Jim I am following your tutorial on selenium I am using Facebook to test and I am using a MacBook I installed my chrome driver using brew
I run into my first issue which is alert and I want to disable alerts and have no idea how to add it to my chrome since it opens on its own without declaring a driver path please help
import facebook.constants as const
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import time
class FacebookBot(webdriver.Chrome):
"""a class to control and automate a facebook bot for srappping"""
def __init__(self, teardown=False):
self.teardown = teardown
super(FacebookBot, self).__init__()
self.implicitly_wait(20)
def __exit__(self, *args) -> None:
if self.teardown:
self.quit()
return super().__exit__(*args)
def facebook_homepage(self):
"""navigating the facebook scrapper bot to the facebook home page."""
self.get(const.BASE_URL)```
Metadata
Metadata
Assignees
Labels
No labels