hellorahulk commited on
Commit
bbb039b
1 Parent(s): 219b5ce

Update steps/Bots.py

Browse files
Files changed (1) hide show
  1. steps/Bots.py +8 -1
steps/Bots.py CHANGED
@@ -4,6 +4,12 @@ from selenium.webdriver.common.by import By
4
  from selenium.webdriver.support.ui import WebDriverWait
5
  from selenium.webdriver.support import expected_conditions as EC
6
  from selenium.webdriver.common.keys import Keys
 
 
 
 
 
 
7
 
8
  from abc import ABC,abstractmethod
9
  import pandas as pd
@@ -29,7 +35,8 @@ class CompetitorBot(BOT):
29
  '''
30
 
31
  def target_html(self,company_name: str) -> str:
32
- browser = webdriver.Firefox()
 
33
 
34
  #Searching on FireFox
35
  browser.get('http://www.google.com')
 
4
  from selenium.webdriver.support.ui import WebDriverWait
5
  from selenium.webdriver.support import expected_conditions as EC
6
  from selenium.webdriver.common.keys import Keys
7
+ from selenium.webdriver.firefox.options import Options
8
+
9
+ options = Options()
10
+ options.add_argument("--headless")
11
+
12
+
13
 
14
  from abc import ABC,abstractmethod
15
  import pandas as pd
 
35
  '''
36
 
37
  def target_html(self,company_name: str) -> str:
38
+ browser = webdriver.Firefox(options=options)
39
+ # browser = webdriver.Firefox()
40
 
41
  #Searching on FireFox
42
  browser.get('http://www.google.com')