-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vishal Palasgaonkar
authored and
Vishal Palasgaonkar
committed
Mar 7, 2023
1 parent
7a05346
commit bf986e1
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# importing the modules | ||
import time | ||
|
||
from selenium import webdriver | ||
from selenium.webdriver.common.by import By | ||
|
||
# using chrome driver | ||
driver = webdriver.Safari() | ||
driver.set_window_size(1350, 768) | ||
|
||
# web page url | ||
driver.get("https://fs2.formsite.com/meherpavan/form2/index.html?1537702596407") | ||
|
||
# select class name where is input box are present | ||
input_elements = driver.find_elements(By.CLASS_NAME, "text_field") | ||
|
||
# find number of input box | ||
print("input_elements: ", input_elements) | ||
|
||
# fill value in input box | ||
driver.find_element(By.XPATH, '//*[@id="RESULT_TextField-1"]').send_keys("Vishal") | ||
driver.find_element(By.XPATH, '//*[@id="RESULT_TextField-2"]').send_keys("Palasgaonkar") | ||
driver.find_element(By.XPATH, '//*[@id="RESULT_TextField-3"]').send_keys("99999999") | ||
time.sleep(1) | ||
|
||
# check status | ||
is_result_displayed = driver.find_element( | ||
By.XPATH, '//*[@id="RESULT_TextField-1"]' | ||
).is_displayed() | ||
print("is_result_displayed: ", is_result_displayed) | ||
driver.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import time | ||
|
||
from selenium import webdriver | ||
from selenium.webdriver.common.by import By | ||
|
||
|
||
driver = webdriver.Safari() | ||
driver.set_window_size(1350, 768) | ||
|
||
|
||
driver.get("https://fs2.formsite.com/meherpavan/form2/index.html?1537702596407") | ||
|
||
|
||
# Selecting radio button | ||
# Select male | ||
driver.find_element(By.XPATH, '//*[@id="q26"]/table/tbody/tr[1]/td/label').click() | ||
|
||
|
||
# Selecting check box | ||
# Select sunday | ||
driver.find_element(By.XPATH, '//*[@id="q15"]/table/tbody/tr[1]/td/label').click() | ||
|
||
|
||
# Select monday | ||
driver.find_element(By.XPATH, '//*[@id="q15"]/table/tbody/tr[2]/td/label').click() | ||
time.sleep(3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import time | ||
|
||
from selenium import webdriver | ||
from selenium.webdriver.common.by import By | ||
from selenium.webdriver.support.ui import Select | ||
|
||
driver = webdriver.Safari() | ||
driver.set_window_size(2560, 1600) | ||
|
||
|
||
driver.get("https://fs2.formsite.com/meherpavan/form2/index.html?1537702596407") | ||
|
||
# find id of option | ||
x = driver.find_element(By.ID, "RESULT_RadioButton-9") | ||
drop = Select(x) | ||
|
||
# select by visible text | ||
drop.select_by_visible_text("Afternoon") | ||
time.sleep(4) | ||
driver.close() |