How to use radioButtons method in pyatom

Best Python code snippet using pyatom_python

formSubmitter.py

Source:formSubmitter.py Github

copy

Full Screen

1# Female Male Prefer not to say2# 0 1 23# Single Married Prefer not to say4# 3 4 55# 18-24 25-31 32-38 39-45 46 and above6# 6 7 8 9 107# Matric Intermediate Under-graduate Graduate PhD8# 11 12 13 14 159# Up to 40k 41k to 70k 71k to 100k 101k to 150k 150k and above Prefer not to say10# 16 17 18 19 20 2111# I feel comfortable while using internet banking services.12# 0-413# Using internet banking services is easy for me.14# 5-915# I find all internet banking content understandable.16# 10-1417# I can use internet banking services without asking for help.18# 15-1919# I think the easy use of internet banking services makes it more useful.20# 20-2421# People whose opinions I value think that internet banking is useful.22# 0-423# People who influence my behavior think that I should use internet banking.24# 5-925# I most likely tend to benefits from others’ experience and their advice..26# 10-1427# The others’ opinions motivate me to use internet banking.28# 15-1929# People in my environment who use Internet banking services have a high profile30# 20-2431# Using internet banking gives me greater control over my financial issues.32# 0-433# Using internet banking provides me with convenient access to my accounts.34# 5-935# Using internet banking saves my time and enables me to do my banking activity quickly.36# 10-1437# Using internet banking enables me to utilize the bank’s services efficiently.38# 15-1939# The bank’s website can be accessed when needed – 24 hours/day, 7 days/week40# 0-441# The bank’s web design and navigation makes it comfortable to conduct a transaction42# 5-943# The bank’s website executes transactions quickly and efficiently44# 10-1445# There is evidence that the current security provided by the bank website is sufficient46# 15-1947# There is a chance to lose money if I use internet banking services.48# 0-449# I am worried that third parties would steal my username and password.50# 5-951# Fixing payments errors after using internet banking may require a long time Thus reducing the convenience of these services.52# 10-1453# Internet banking servers may not perform well and thus process payment incorrectly.54# 15-1955# I think that it would be risky if I use Internet banking56# 20-2457# The ability to access the internet at any time at work and at home58# 0-459# Documentary evidence is provided for all transactions performed online60# 5-961# The banks providing acceptable conditions and terms of service62# 10-1463# Being able to trial doing banking transactions online before registering for the service64# 15-1965from selenium import webdriver66import time67from selenium.webdriver.support.ui import WebDriverWait68from selenium.webdriver.support import expected_conditions as EC69from selenium.webdriver.common.by import By70option = webdriver.ChromeOptions()71chrome_prefs = {}72chrome_prefs["profile.default_content_settings"] = { "popups": 1 }73option.experimental_options["prefs"] = chrome_prefs74option.add_argument("-incognito")75option.add_experimental_option("excludeSwitches", ['enable-automation'])76# option.add_experimental_option("excludeSwitches", ['disable-popup-blocking'])77# option.add_argument("--disable-popup-blocking")78#option.add_argument("--headless")79#option.add_argument("disable-gpu")80browser = webdriver.Chrome(executable_path='/home/marib/bin/chromedriver', options=option)81def submitResponse(response):82 browser.get("https://forms.gle/NYn6Kpr28SibBUTP9")83 # myElem = WebDriverWait(browser, 3).until(EC.presence_of_element_located((By.CLASS_NAME, 'appsMaterialWizButtonPaperbuttonLabel')))84 85 # 86 # Landing Page 87 # 88 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))89 # Use online banking - YES90 radioButtons[int(response[0])].click()91 nextBtn = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizButtonPaperbuttonLabel')))92 nextBtn[0].click()93# 94 # Demographics95# 96 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))97 # Gender98 time.sleep(0.2)99 radioButtons[int(response[1])].click()100 # Marital Status101 time.sleep(0.2)102 radioButtons[int(response[2])].click()103 # Age104 time.sleep(0.2)105 radioButtons[int(response[3])].click()106 # Education107 time.sleep(0.2)108 radioButtons[int(response[4])].click()109 # Income110 time.sleep(0.2)111 radioButtons[int(response[5])].click()112 # ------------------------Next 113 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")114 nextBtn[6].click()115# 116 # Ease of Use117# 118 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))119 # I feel comfortable while using internet banking services.120 time.sleep(0.2)121 radioButtons[int(response[6])].click()122 # Using internet banking services is easy for me.123 time.sleep(0.2)124 radioButtons[int(response[7])].click()125 126 # I find all internet banking content understandable.127 time.sleep(0.2)128 radioButtons[int(response[8])].click()129 130 # I can use internet banking services without asking for help.131 time.sleep(0.2)132 radioButtons[int(response[9])].click()133 134 # I think the easy use of internet banking services makes it more useful.135 time.sleep(0.2)136 radioButtons[int(response[10])].click()137 138 # ------------------------Next 139 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")140 nextBtn[6].click()141# 142 # Subjective Norms143# 144 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))145 # People whose opinions I value think that internet banking is useful..146 time.sleep(0.2)147 radioButtons[int(response[11])].click()148 # People who influence my behavior think that I should use internet banking.149 time.sleep(0.2)150 radioButtons[int(response[12])].click()151 152 # I most likely tend to benefits from others’ experience and their advice..153 time.sleep(0.2)154 radioButtons[int(response[13])].click()155 156 # The others’ opinions motivate me to use internet banking.157 time.sleep(0.2)158 radioButtons[int(response[14])].click()159 160 # People in my environment who use Internet banking services have a high profile161 time.sleep(0.2)162 radioButtons[int(response[15])].click()163 164 # ------------------------Next 165 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")166 nextBtn[6].click()167# 168 # Usefulness169# 170 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))171 # Using internet banking gives me greater control over my financial issues.172 time.sleep(0.2)173 radioButtons[int(response[16])].click()174 # Using internet banking provides me with convenient access to my accounts.175 time.sleep(0.2)176 radioButtons[int(response[17])].click()177 178 # Using internet banking saves my time and enables me to do my banking activity quickly.179 time.sleep(0.2)180 radioButtons[int(response[18])].click()181 182 # Using internet banking enables me to utilize the bank’s services efficiently.183 time.sleep(0.2)184 radioButtons[int(response[19])].click()185 186 # ------------------------Next 187 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")188 nextBtn[5].click()189# 190 # Web Features191# 192 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))193 # The bank’s website can be accessed when needed – 24 hours/day, 7 days/week194 time.sleep(0.2)195 radioButtons[int(response[20])].click()196 # The bank’s web design and navigation makes it comfortable to conduct a transaction197 time.sleep(0.2)198 radioButtons[int(response[21])].click()199 200 # The bank’s website executes transactions quickly and efficiently201 time.sleep(0.2)202 radioButtons[int(response[22])].click()203 204 # There is evidence that the current security provided by the bank website is sufficient205 time.sleep(0.2)206 radioButtons[int(response[23])].click()207 208 # ------------------------Next 209 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")210 nextBtn[5].click()211# 212 # Risk213# 214 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))215 # There is a chance to lose money if I use internet banking services.216 time.sleep(0.2)217 radioButtons[int(response[24])].click()218 # I am worried that third parties would steal my username and password.219 time.sleep(0.2)220 radioButtons[int(response[25])].click()221 222 # Fixing payments errors after using internet banking may require a long time Thus reducing the convenience of these services.223 time.sleep(0.2)224 radioButtons[int(response[26])].click()225 226 # Internet banking servers may not perform well and thus process payment incorrectly.227 time.sleep(0.2)228 radioButtons[int(response[27])].click()229 230 # I think that it would be risky if I use Internet banking231 time.sleep(0.2)232 radioButtons[int(response[28])].click()233 234 # ------------------------Next 235 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")236 nextBtn[6].click()237# 238 # Adoption of online banking239# 240 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))241 # The ability to access the internet at any time at work and at home242 time.sleep(0.2)243 radioButtons[int(response[29])].click()244 # Documentary evidence is provided for all transactions performed online245 time.sleep(0.2)246 radioButtons[int(response[30])].click()247 248 # The banks providing acceptable conditions and terms of service249 time.sleep(0.2)250 radioButtons[int(response[31])].click()251 252 # Being able to trial doing banking transactions online before registering for the service253 time.sleep(0.2)254 radioButtons[int(response[32])].click()255 256 # -----------------Submit 257 submitbutton = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")258 submitbutton[5].click()259 WebDriverWait(browser, 5).until(EC.presence_of_element_located((By.CLASS_NAME, 'freebirdFormviewerViewResponseConfirmationMessage')))...

Full Screen

Full Screen

BADM copy.py

Source:BADM copy.py Github

copy

Full Screen

1# Female Male Prefer not to say2# 0 1 23# Single Married Prefer not to say4# 3 4 55# 18-24 25-31 32-38 39-45 46 and above6# 6 7 8 9 107# Matric Intermediate Under-graduate Graduate PhD8# 11 12 13 14 159# Up to 40k 41k to 70k 71k to 100k 101k to 150k 150k and above Prefer not to say10# 16 17 18 19 20 2111# I feel comfortable while using internet banking services.12# 0-413# Using internet banking services is easy for me.14# 5-915# I find all internet banking content understandable.16# 10-1417# I can use internet banking services without asking for help.18# 15-1919# I think the easy use of internet banking services makes it more useful.20# 20-2421# People whose opinions I value think that internet banking is useful.22# 0-423# People who influence my behavior think that I should use internet banking.24# 5-925# I most likely tend to benefits from others’ experience and their advice..26# 10-1427# The others’ opinions motivate me to use internet banking.28# 15-1929# People in my environment who use Internet banking services have a high profile30# 20-2431# Using internet banking gives me greater control over my financial issues.32# 0-433# Using internet banking provides me with convenient access to my accounts.34# 5-935# Using internet banking saves my time and enables me to do my banking activity quickly.36# 10-1437# Using internet banking enables me to utilize the bank’s services efficiently.38# 15-1939# The bank’s website can be accessed when needed – 24 hours/day, 7 days/week40# 0-441# The bank’s web design and navigation makes it comfortable to conduct a transaction42# 5-943# The bank’s website executes transactions quickly and efficiently44# 10-1445# There is evidence that the current security provided by the bank website is sufficient46# 15-1947# There is a chance to lose money if I use internet banking services.48# 0-449# I am worried that third parties would steal my username and password.50# 5-951# Fixing payments errors after using internet banking may require a long time Thus reducing the convenience of these services.52# 10-1453# Internet banking servers may not perform well and thus process payment incorrectly.54# 15-1955# I think that it would be risky if I use Internet banking56# 20-2457from selenium import webdriver58import time59from selenium.webdriver.support.ui import WebDriverWait60from selenium.webdriver.support import expected_conditions as EC61from selenium.webdriver.common.by import By62option = webdriver.ChromeOptions()63chrome_prefs = {}64chrome_prefs["profile.default_content_settings"] = { "popups": 1 }65option.experimental_options["prefs"] = chrome_prefs66option.add_argument("-incognito")67option.add_experimental_option("excludeSwitches", ['enable-automation'])68# option.add_experimental_option("excludeSwitches", ['disable-popup-blocking'])69# option.add_argument("--disable-popup-blocking")70#option.add_argument("--headless")71#option.add_argument("disable-gpu")72browser = webdriver.Chrome(executable_path='/home/marib/bin/chromedriver', options=option)73for x in range(10):74 browser.get("https://forms.gle/UvtYUeejoc1ELeYG9")75 # myElem = WebDriverWait(browser, 3).until(EC.presence_of_element_located((By.CLASS_NAME, 'appsMaterialWizButtonPaperbuttonLabel')))76 77 # 78 # Landing Page 79 # 80 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))81 # Use online banking - YES82 radioButtons[0].click()83 nextBtn = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizButtonPaperbuttonLabel')))84 nextBtn[0].click()85# 86 # Demographics87# 88 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))89 # Gender90 time.sleep(1)91 radioButtons[1].click()92 # Marital Status93 time.sleep(1)94 radioButtons[4].click()95 # Age96 time.sleep(1)97 radioButtons[8].click()98 # Education99 time.sleep(1)100 radioButtons[12].click()101 # Income102 time.sleep(1)103 radioButtons[21].click()104 # ------------------------Next 105 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")106 nextBtn[6].click()107# 108 # Ease of Use109# 110 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))111 # I feel comfortable while using internet banking services.112 time.sleep(1)113 radioButtons[0].click()114 # Using internet banking services is easy for me.115 time.sleep(1)116 radioButtons[7].click()117 118 # I find all internet banking content understandable.119 time.sleep(1)120 radioButtons[12].click()121 122 # I can use internet banking services without asking for help.123 time.sleep(1)124 radioButtons[18].click()125 126 # I think the easy use of internet banking services makes it more useful.127 time.sleep(1)128 radioButtons[24].click()129 130 # ------------------------Next 131 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")132 nextBtn[6].click()133# 134 # Subjective Norms135# 136 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))137 # People whose opinions I value think that internet banking is useful..138 time.sleep(1)139 radioButtons[0].click()140 # People who influence my behavior think that I should use internet banking.141 time.sleep(1)142 radioButtons[7].click()143 144 # I most likely tend to benefits from others’ experience and their advice..145 time.sleep(1)146 radioButtons[12].click()147 148 # The others’ opinions motivate me to use internet banking.149 time.sleep(1)150 radioButtons[18].click()151 152 # People in my environment who use Internet banking services have a high profile153 time.sleep(1)154 radioButtons[24].click()155 156 # ------------------------Next 157 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")158 nextBtn[6].click()159# 160 # Usefulness161# 162 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))163 # Using internet banking gives me greater control over my financial issues.164 time.sleep(1)165 radioButtons[0].click()166 # Using internet banking provides me with convenient access to my accounts.167 time.sleep(1)168 radioButtons[7].click()169 170 # Using internet banking saves my time and enables me to do my banking activity quickly.171 time.sleep(1)172 radioButtons[12].click()173 174 # Using internet banking enables me to utilize the bank’s services efficiently.175 time.sleep(1)176 radioButtons[18].click()177 178 # ------------------------Next 179 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")180 nextBtn[5].click()181# 182 # Web Features183# 184 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))185 # The bank’s website can be accessed when needed – 24 hours/day, 7 days/week186 time.sleep(1)187 radioButtons[0].click()188 # The bank’s web design and navigation makes it comfortable to conduct a transaction189 time.sleep(1)190 radioButtons[7].click()191 192 # The bank’s website executes transactions quickly and efficiently193 time.sleep(1)194 radioButtons[12].click()195 196 # There is evidence that the current security provided by the bank website is sufficient197 time.sleep(1)198 radioButtons[18].click()199 200 # ------------------------Next 201 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")202 nextBtn[5].click()203# 204 # Risk205# 206 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))207 # There is a chance to lose money if I use internet banking services.208 time.sleep(1)209 radioButtons[0].click()210 # I am worried that third parties would steal my username and password.211 time.sleep(1)212 radioButtons[7].click()213 214 # Fixing payments errors after using internet banking may require a long time Thus reducing the convenience of these services.215 time.sleep(1)216 radioButtons[12].click()217 218 # Internet banking servers may not perform well and thus process payment incorrectly.219 time.sleep(1)220 radioButtons[18].click()221 222 # I think that it would be risky if I use Internet banking223 time.sleep(1)224 radioButtons[24].click()225 226 # ------------------------Next 227 nextBtn = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")228 nextBtn[6].click()229# 230 # Adoption of online banking231# 232 radioButtons = WebDriverWait(browser, 3).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'appsMaterialWizToggleRadiogroupOffRadio')))233 # The ability to access the internet at any time at work and at home234 time.sleep(1)235 radioButtons[0].click()236 # Documentary evidence is provided for all transactions performed online237 time.sleep(1)238 radioButtons[7].click()239 240 # The banks providing acceptable conditions and terms of service241 time.sleep(1)242 radioButtons[12].click()243 244 # Being able to trial doing banking transactions online before registering for the service245 time.sleep(1)246 radioButtons[18].click()247 248 # -----------------Submit 249 submitbutton = browser.find_elements_by_class_name("appsMaterialWizButtonPaperbuttonLabel")250 submitbutton[5].click()251 WebDriverWait(browser, 5).until(EC.presence_of_element_located((By.CLASS_NAME, 'freebirdFormviewerViewResponseConfirmationMessage')))...

Full Screen

Full Screen

dailyhealthsurvey.py

Source:dailyhealthsurvey.py Github

copy

Full Screen

1from selenium import webdriver2# webdriver location3driver = webdriver.Chrome("C:\\Users\\clair\\Desktop\\python projects\\chromedriver.exe")4# initialize URL5url = "https://www.amherst.edu/go/student-health-survey"6driver.get(url)7# fill out the form8radiobuttons = driver.find_elements_by_class_name("appsMaterialWizToggleRadiogroupElContainer")9radiobuttons[0].click()10nextButton = driver.find_element_by_class_name("appsMaterialWizButtonPaperbuttonLabel.quantumWizButtonPaperbuttonLabel.exportLabel")11nextButton.click()12radiobuttons = driver.find_elements_by_class_name("appsMaterialWizToggleRadiogroupElContainer")13radiobuttons[1].click()14nextButton = driver.find_element_by_class_name("appsMaterialWizButtonPaperbuttonLabel.quantumWizButtonPaperbuttonLabel.exportLabel")15nextButton.click()16radiobuttons = driver.find_elements_by_class_name("appsMaterialWizToggleRadiogroupElContainer")17radiobuttons[1].click()18nextButton = driver.find_element_by_class_name("appsMaterialWizButtonPaperbuttonLabel.quantumWizButtonPaperbuttonLabel.exportLabel")19nextButton.click()20radiobuttons = driver.find_elements_by_class_name("appsMaterialWizToggleRadiogroupElContainer")21radiobuttons[1].click()22nextButton = driver.find_element_by_class_name("appsMaterialWizButtonPaperbuttonLabel.quantumWizButtonPaperbuttonLabel.exportLabel")23nextButton.click()24radiobuttons = driver.find_elements_by_class_name("appsMaterialWizToggleRadiogroupElContainer")25radiobuttons[1].click()26nextButton = driver.find_element_by_class_name("appsMaterialWizButtonPaperbuttonLabel.quantumWizButtonPaperbuttonLabel.exportLabel")27nextButton.click()28radiobuttons = driver.find_elements_by_class_name("appsMaterialWizToggleRadiogroupElContainer")29radiobuttons[2].click()30submitButton = driver.find_element_by_class_name("appsMaterialWizButtonPaperbuttonLabel quantumWizButtonPaperbuttonLabel exportLabel")...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run pyatom automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful