-
Notifications
You must be signed in to change notification settings - Fork 1
/
autoSel.py
26 lines (22 loc) · 794 Bytes
/
autoSel.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import command
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
ans='yes'
def doAuto():
try:
driver=webdriver.Chrome(executable_path="C:\drive\chromedriver.exe")
driver.get("https://www.google.com/")
command.speak("Boss , What you want to search ")
query=command.takeCommand().lower()
inputField=drive.find_element_by_name("q")
inputField.sendKeys(query)
while( ans == 'yes'):
command.speak("Boss , Got Desired Result . if not then I can Go back")
go=command.takeCommand()
if 'back' in go:
drive.back()
else :
command.speak("boss ok")
except:
command.speak("Boss Error Occured")