Skip to content

I was forced to come raise an issue here so as to reach out to you  #1

Description

@femiir

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)```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions