1

This error pops after the first or second run of the program. Wierd part is it works fine to the first run when I open the IDLE. I am trying to create a bot to login to Insta page.

**The code:**

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
class InstagramBot():
    def __init__(self, email, password):
        self.browser = webdriver.Chrome()
        self.email = email
        self.password = password
    def signIn(self):
        self.browser.get('https://www.instagram.com')

        emailInput = self.browser.find_elements_by_css_selector('form input')[0]
        emailInput.send_keys(self.email)
        
        passwordInput = self.browser.find_elements_by_css_selector('form input')[1]
        passwordInput.send_keys(self.password)
        passwordInput.send_keys(Keys.ENTER)
        time.sleep(2)
bot = InstagramBot('your_username', 'your_password')
bot.signIn() 

"I have also tried giving path of chromedriver.exe"

Error:
[8948:11296:1108/215632.683:ERROR:device_event_log_impl.cc(208)] [21:56:32.682] Bluetooth: bluetooth_adapter_winrt.cc:1076 Getting Default Adapter failed.

0 Answers0