-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathassignmentcodes.py
108 lines (59 loc) · 1.98 KB
/
assignmentcodes.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.alert import Alert
from selenium.webdriver.common.action_chains import ActionChains
import time
#from selenium.webdriver.support.ui import Select
driver = webdriver.Chrome(executable_path="D:\selenium\chromedriver_win32\chromedriver.exe")
driver.get('http://automationpractice.com/index.php')
#abc=driver.find_element_by_xpath("//*[@id='header']").click()
#abc.click()
#alert_button= driver.find_element_by_id("header")
#alert_button.click()
a1= driver.find_element_by_class_name("login")
a1.click()
#
a2=driver.find_element_by_id("email_create").send_keys("kshivakumar145@gmail.com")
time.sleep(2)
a3=driver.find_element_by_id("SubmitCreate")
#
a3.click()
time.sleep(2)
#SubmitLogin
a4=driver.find_element_by_id("id_gender1")
a4.click()
time.sleep(2)
a5=driver.find_element_by_id("customer_firstname").send_keys("shiva")
time.sleep(2)
a6=driver.find_element_by_id("customer_lastname").send_keys("kumarK")
time.sleep(2)
a7=driver.find_element_by_id("passwd").send_keys("zxcvbnml")
time.sleep(2)
a9=driver.find_element_by_id("firstname").send_keys("shiva")
time.sleep(2)
a10=driver.find_element_by_id("lastname").send_keys("kumarK")
time.sleep(2)
a8=driver.find_element_by_id("address1").send_keys("Mellahalli")
time.sleep(2)
a11=driver.find_element_by_id("city").send_keys("KGF")
time.sleep(2)
a12=driver.find_element_by_id("id_state").send_keys("karnataka")
time.sleep(2)
a13=driver.find_element_by_id("postcode").send_keys("5700")
time.sleep(2)
#uniform-id_country
a9=driver.find_element_by_id("submitAccount")
#
a9.click()
"""
# each step validation checking by adding one-one test script please go through ......
a2=driver.find_element_by_id("email").send_keys("kshivakumar145@gmail.com")
time.sleep(2)
a2=driver.find_element_by_id("passwd").send_keys("zxcvbnml")
time.sleep(2)
time.sleep(2)
a3=driver.find_element_by_id("SubmitLogin")
#
a3.click()
time.sleep(2)
"""