Skip to content

Commit

Permalink
the final commit without bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaur008 committed Oct 11, 2020
1 parent 1b165a8 commit a115d6a
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 27 deletions.
83 changes: 56 additions & 27 deletions autoAsk.py
Original file line number Diff line number Diff line change
@@ -1,43 +1,64 @@
from datetime import datetime
import time


from selenium import webdriver
from getpass import getpass
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options


from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.support import expected_conditions as EC



options = webdriver.ChromeOptions()
options.add_argument("--disable-infobars")
options.add_argument("--mute-audio")
options.add_experimental_option("prefs", { \
"profile.default_content_setting_values.media_stream_mic": 2, # 1:allow, 2:block
"profile.default_content_setting_values.media_stream_camera": 2, # 1:allow, 2:block
"profile.default_content_setting_values.geolocation": 2, # 1:allow, 2:block
"profile.default_content_setting_values.notifications": 2 # 1:allow, 2:block
})



driver =webdriver.Chrome(ChromeDriverManager().install(),chrome_options=options)

driver =webdriver.Chrome(ChromeDriverManager().install())
driver.get("https://meet.google.com/")
driver.maximize_window()

def checker(s):
if (len(driver.find_elements(By.XPATH, s)) != 0):
return 0
else:
driver.implicitly_wait(10)
checker(s)


signin_btn=driver.find_element(By.XPATH, '/html/body/header/div[1]/div/div[3]/div[1]/div/span[1]/a')
signin_btn.click()

enter_email =driver.find_element(By.XPATH, '//*[@id="identifierId"]')
email=input("enter in your email ")
#email=input("enter in your email ")
email="[email protected]"
enter_email.send_keys(email)

driver.find_element(By.XPATH, '//*[@id="identifierNext"]/div/button/div[2]').click()


wait = WebDriverWait(driver, 300)
wait.until(ec.visibility_of_element_located((By.XPATH, '//*[@id="password"]/div[1]/div/div[1]/input')))

checker('//*[@id="password"]/div[1]/div/div[1]/input')
enter_password =driver.find_element(By.XPATH, '//*[@id="password"]/div[1]/div/div[1]/input')
password=input("enter in your password ")
#password=input("enter in your password ")
password="hargunharman"
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="password"]/div[1]/div/div[1]/input')))
enter_password.send_keys(password)

WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="passwordNext"]/div/button/div[2]')))
driver.find_element(By.XPATH, '//*[@id="passwordNext"]/div/button/div[2]').click()

wait.until(ec.visibility_of_element_located((By.XPATH, '//*[@id="i3"]')))
checker('//*[@id="i3"]')
meetlink=input("enter in your meet code ")
link_textbox =driver.find_element(By.XPATH, '//*[@id="i3"]')
link_textbox.send_keys(meetlink)
Expand All @@ -46,25 +67,33 @@
join_button=driver.find_element(By.XPATH, '//*[@id="yDmH0d"]/c-wiz/div/div[2]/div/div[1]/div[3]/div[2]/div[2]/button/div[2]')
join_button.click()

wait.until(ec.visibility_of_element_located((By.XPATH, '//*[@id="yDmH0d"]/div[3]/div/div[2]/div[3]/div/span/span')))
checker('//*[@id="yDmH0d"]/div[3]/div/div[2]/div[3]/div/span/span')
driver.find_element(By.XPATH, '//*[@id="yDmH0d"]/div[3]/div/div[2]/div[3]/div/span/span').click()
wait.until(ec.visibility_of_element_located((By.XPATH, '//*[@id="yDmH0d"]/c-wiz/div/div/div[5]/div[3]/div/div/div[2]/div/div/div[2]/div/div[2]/div/div[1]/div/span/span')))
driver.implicitly_wait(1000)
WebDriverWait(driver, 320).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="yDmH0d"]/c-wiz/div/div/div[5]/div[3]/div/div/div[2]/div/div/div[2]/div/div[2]/div/div[1]/div/span/span')))
driver.find_element(By.XPATH, '//*[@id="yDmH0d"]/c-wiz/div/div/div[5]/div[3]/div/div/div[2]/div/div/div[2]/div/div[2]/div/div[1]/div/span/span').click()

wait = WebDriverWait(driver, 1000)
wait.until(ec.visibility_of_element_located((By.XPATH, '//*[@id="ow3"]/div[1]/div/div[5]/div[3]/div[6]/div[3]/div/div[2]/div[1]/span/span')))
checker('//*[@id="ow3"]/div[1]/div/div[5]/div[3]/div[6]/div[3]/div/div[2]/div[1]/span/span')
driver.find_element(By.XPATH, '//*[@id="ow3"]/div[1]/div/div[5]/div[3]/div[6]/div[3]/div/div[2]/div[1]/span/span').click()



all_spans = driver.find_elements_by_class_name('cS7aqe NkoVdd')
print(" --------------->list of participants as generated at time <-------------")


now = datetime.now()
print("now time is =", now)

for span in all_spans:
print(" "+span.text)


def print_list():
checker("//div[@class='cS7aqe NkoVdd']")
driver.implicitly_wait(20)
all_spans = driver.find_elements_by_xpath("//div[@class='cS7aqe NkoVdd']")
if(len(all_spans)>1):
print("-----> list of participants as generated at time ")
now = datetime.now()
print("now time is ====", now)
for span in all_spans:
print(span.text)



def executeSomething():
print_list()
time.sleep(60*1)

while True:
executeSomething()

#https://meet.google.com/$rpc/google.rtc.meetings.v1.MeetingSpaceService/SyncMeetingSpaceCollections
28 changes: 28 additions & 0 deletions debug.log
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,31 @@
[1007/043202.828:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5)
[1007/043202.830:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1007/043202.830:ERROR:exception_snapshot_win.cc(99)] thread ID 4136 not found in process
[1007/195546.471:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1007/195546.499:ERROR:exception_snapshot_win.cc(99)] thread ID 11448 not found in process
[1007/195546.474:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1007/195546.500:ERROR:exception_snapshot_win.cc(99)] thread ID 96 not found in process
[1007/195546.503:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1007/195546.503:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1007/195546.504:ERROR:exception_snapshot_win.cc(99)] thread ID 12220 not found in process
[1007/195546.504:ERROR:exception_snapshot_win.cc(99)] thread ID 6728 not found in process
[1007/204828.468:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1007/204828.471:ERROR:exception_snapshot_win.cc(99)] thread ID 30052 not found in process
[1007/204828.502:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1007/204828.503:ERROR:exception_snapshot_win.cc(99)] thread ID 19360 not found in process
[1008/045041.336:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1008/045041.352:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1008/045041.365:ERROR:exception_snapshot_win.cc(99)] thread ID 15032 not found in process
[1008/045041.365:ERROR:exception_snapshot_win.cc(99)] thread ID 7692 not found in process
[1008/045553.221:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1008/045553.224:ERROR:exception_snapshot_win.cc(99)] thread ID 31452 not found in process
[1008/045553.241:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1008/045553.241:ERROR:exception_snapshot_win.cc(99)] thread ID 1596 not found in process
[1009/125620.473:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1009/125620.559:ERROR:exception_snapshot_win.cc(99)] thread ID 19888 not found in process
[1009/192344.124:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1009/192344.155:ERROR:exception_snapshot_win.cc(99)] thread ID 332 not found in process
[1011/230859.089:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1011/230859.137:ERROR:exception_snapshot_win.cc(99)] thread ID 14840 not found in process
[1011/230859.139:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1011/230859.139:ERROR:exception_snapshot_win.cc(99)] thread ID 28628 not found in process

0 comments on commit a115d6a

Please sign in to comment.