-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsetup.py
51 lines (36 loc) · 1.17 KB
/
setup.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import subprocess
import sys
from __dwnldDrivers.versions import *
def install(name):
subprocess.check_call([sys.executable, '-m', 'pip', 'install', name])
def main():
my_packages = ['requests', 'clint', 'faker', 'selenium', 'colorama']
installed_pr = []
for package in my_packages:
install(package)
print('\n')
print('Firefox')
firefox_ver = get_firefox_version()
if firefox_ver != None:
is_firefox_there = 1
installed_pr.append('Firefox')
setup_Firefox(firefox_ver)
else:
is_firefox_there = 0
print('Firefox isn\'t installed')
if is_firefox_there == 0 :
print(
'Error - Setup installation failed \nReason - Please install Firefox browser to complete setup process')
exit()
inpErr = True
while inpErr != False:
print('\nEnter id ex - 1 or 2: ', end='')
userInput = int(1)
if userInput <= len(installed_pr) and userInput > 0:
selected = installed_pr[userInput - 1]
inpErr = False
else:
print('Wrong id, Either input 1 or 2')
print('Setup Completed')
if __name__ == '__main__':
main()