-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
63 lines (41 loc) · 1.98 KB
/
main.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
52
53
54
55
56
57
58
59
60
61
62
63
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
def join_meet():
opt = Options()
opt.add_argument("start-maximized")
opt.add_argument("--disable-extensions")
opt.add_experimental_option("prefs", {
"profile.default_content_setting_values.media_stream_mic": 1,
"profile.default_content_setting_values.media_stream_camera": 1,
"profile.default_content_setting_values.geolocation": 1,
"profile.default_content_setting_values.notifications": 1
})
driver = webdriver.Chrome(
chrome_options=opt, executable_path='chromedriver.exe')
driver.get('https://accounts.google.com/')
username = driver.find_element_by_id('identifierId')
username.click()
username.send_keys('Your Email Id')
next = driver.find_element(by=By.XPATH, value='//*[@id="identifierNext"]/div/button/span')
next.click()
time.sleep(5)
password = driver.find_element(by=By.XPATH, value='//*[@id="password"]/div[1]/div/div[1]/input')
password.click()
password.send_keys('Your Password')
next = driver.find_element(by=By.XPATH, value='//*[@id="passwordNext"]/div/button/span')
next.click()
time.sleep(5)
driver.get('https://meet.google.com/ihh-bqcp-zjs')
time.sleep(5)
camera = driver.find_element(by=By.XPATH, value='//*[@id="yDmH0d"]/c-wiz/div/div/div[12]/div[3]/div/div[1]/div[4]/div/div/div[1]/div[1]/div/div[5]/div[2]/div/div[1]/span')
camera.click()
time.sleep(5)
mic = driver.find_element(by=By.XPATH, value='//*[@id="yDmH0d"]/c-wiz/div/div/div[12]/div[3]/div/div[1]/div[4]/div/div/div[1]/div[1]/div/div[5]/div[1]/div/div/div[1]/span/span/div/div[1]')
mic.click()
time.sleep(5)
join = driver.find_element(by=By.XPATH, value='//*[@id="yDmH0d"]/c-wiz/div/div/div[12]/div[3]/div/div[1]/div[4]/div/div/div[2]/div/div[2]/div/div[1]/div[1]/button')
join.click()
input()
join_meet()