GGUF
conversational
luguog commited on
Commit
13709d4
·
verified ·
1 Parent(s): fe8636d

Upload 2 files

Browse files
Files changed (2) hide show
  1. rent3.py +170 -0
  2. rent_test.py +81 -0
rent3.py ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by Selenium IDE
2
+ import pytest
3
+ import time
4
+ import json
5
+ from selenium import webdriver
6
+ from selenium.webdriver.common.by import By
7
+ from selenium.webdriver.common.action_chains import ActionChains
8
+ from selenium.webdriver.support import expected_conditions
9
+ from selenium.webdriver.support.wait import WebDriverWait
10
+ from selenium.webdriver.common.keys import Keys
11
+ from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
12
+
13
+ class TestRent():
14
+ def setup_method(self, method):
15
+ options = webdriver.FirefoxOptions()
16
+ options.add_argument('--headless=false')
17
+ self.driver = webdriver.Remote(command_executor='http://localhost:4444/wd/hub', options=options)
18
+
19
+ def teardown_method(self, method):
20
+ self.driver.quit()
21
+
22
+ def test_rent(self):
23
+ # Test name: rent
24
+ # Step # | name | target | value
25
+ # 1 | open | / |
26
+ self.driver.get("https://rentmasseur.com/")
27
+ # 2 | click | css=.jsx-1873612555 > .button |
28
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-1873612555 > .button").click()
29
+ # 3 | setWindowSize | 1309x753 |
30
+ self.driver.set_window_size(1309, 753)
31
+ # 4 | click | css=.navbar-column > .jsx-2001960601:nth-child(1) > .navigation-link-text |
32
+ self.driver.find_element(By.CSS_SELECTOR, ".navbar-column > .jsx-2001960601:nth-child(1) > .navigation-link-text").click()
33
+ # 5 | click | id=email |
34
+ self.driver.find_element(By.ID, "email").click()
35
+ # 6 | type | id=email | Karpathianwolf
36
+ self.driver.find_element(By.ID, "email").send_keys("Karpathianwolf")
37
+ # 7 | sendKeys | id=email | ${KEY_ENTER}
38
+ self.driver.find_element(By.ID, "email").send_keys(Keys.ENTER)
39
+ # 8 | click | id=password |
40
+ self.driver.find_element(By.ID, "password").click()
41
+ # 9 | type | id=password | Lola369!
42
+ self.driver.find_element(By.ID, "password").send_keys("Lola369!")
43
+ # 10 | click | css=.switch |
44
+ self.driver.find_element(By.CSS_SELECTOR, ".switch").click()
45
+ # 11 | click | css=.jsx-1345806167 > .button |
46
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-1345806167 > .button").click()
47
+ # 12 | click | css=.status-icon-green |
48
+ self.driver.find_element(By.CSS_SELECTOR, ".status-icon-green").click()
49
+ # 13 | mouseOver | css=.navigation-link > .icon-available |
50
+ element = self.driver.find_element(By.CSS_SELECTOR, ".navigation-link > .icon-available")
51
+ actions = ActionChains(self.driver)
52
+ actions.move_to_element(element).perform()
53
+ # 14 | mouseOut | css=.navigation-link > .icon-available |
54
+ element = self.driver.find_element(By.CSS_SELECTOR, "body")
55
+ actions = ActionChains(self.driver)
56
+ actions.move_to_element(element, 0, 0).perform()
57
+ # 15 | select | css=.has-width-50per:nth-child(2) > .jsx-2753549060 > .jsx-2753549060 | label=6 Hours
58
+ dropdown = self.driver.find_element(By.CSS_SELECTOR, ".has-width-50per:nth-child(2) > .jsx-2753549060 > .jsx-2753549060")
59
+ dropdown.find_element(By.XPATH, "//option[. = '6 Hours']").click()
60
+ # 16 | click | css=.jsx-2753549060:nth-child(6) |
61
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-2753549060:nth-child(6)").click()
62
+ # 17 | click | css=.jsx-2753549060 > .button |
63
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-2753549060 > .button").click()
64
+ # 18 | click | css=.jsx-1820926561 > .item-hover |
65
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-1820926561 > .item-hover").click()
66
+ # 19 | runScript | window.scrollTo(0,110) |
67
+ self.driver.execute_script("window.scrollTo(0,110)")
68
+ # 20 | click | linkText=My Interview |
69
+ self.driver.find_element(By.LINK_TEXT, "My Interview").click()
70
+ # 21 | runScript | window.scrollTo(0,0) |
71
+ self.driver.execute_script("window.scrollTo(0,0)")
72
+ # 22 | click | css=.jsx-3552218322:nth-child(5) > .jsx-3552218322 > .jsx-2745941253 |
73
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-3552218322:nth-child(5) > .jsx-3552218322 > .jsx-2745941253").click()
74
+ # 23 | click | css=.option:nth-child(1) |
75
+ self.driver.find_element(By.CSS_SELECTOR, ".option:nth-child(1)").click()
76
+ # 24 | click | css=.is-justify-content-end |
77
+ self.driver.find_element(By.CSS_SELECTOR, ".is-justify-content-end").click()
78
+ # 25 | click | css=.jsx-3552218322:nth-child(6) .jsx-2745941253 > .jsx-2745941253 |
79
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-3552218322:nth-child(6) .jsx-2745941253 > .jsx-2745941253").click()
80
+ # 26 | click | css=.option:nth-child(1) |
81
+ self.driver.find_element(By.CSS_SELECTOR, ".option:nth-child(1)").click()
82
+ # 27 | click | css=.is-justify-content-end |
83
+ self.driver.find_element(By.CSS_SELECTOR, ".is-justify-content-end").click()
84
+ # 28 | runScript | window.scrollTo(0,550) |
85
+ self.driver.execute_script("window.scrollTo(0,550)")
86
+ # 29 | click | css=.jsx-3552218322:nth-child(7) .jsx-2745941253 > .jsx-2745941253 |
87
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-3552218322:nth-child(7) .jsx-2745941253 > .jsx-2745941253").click()
88
+ # 30 | click | css=.option:nth-child(1) |
89
+ self.driver.find_element(By.CSS_SELECTOR, ".option:nth-child(1)").click()
90
+ # 31 | click | css=.is-justify-content-end |
91
+ self.driver.find_element(By.CSS_SELECTOR, ".is-justify-content-end").click()
92
+ # 32 | runScript | window.scrollTo(0,129) |
93
+ self.driver.execute_script("window.scrollTo(0,129)")
94
+ # 33 | click | linkText=Photos |
95
+ self.driver.find_element(By.LINK_TEXT, "Photos").click()
96
+ # 34 | click | css=.Photos |
97
+ self.driver.find_element(By.CSS_SELECTOR, ".Photos").click()
98
+ # 35 | click | css=.has-cursor-pointer:nth-child(5) .edit-photo |
99
+ self.driver.find_element(By.CSS_SELECTOR, ".has-cursor-pointer:nth-child(5) .edit-photo").click()
100
+ # 36 | runScript | window.scrollTo(0,0) |
101
+ self.driver.execute_script("window.scrollTo(0,0)")
102
+ # 37 | click | css=.icon-font:nth-child(4) |
103
+ self.driver.find_element(By.CSS_SELECTOR, ".icon-font:nth-child(4)").click()
104
+ # 38 | click | css=.has-cursor-pointer:nth-child(4) .edit-photo |
105
+ self.driver.find_element(By.CSS_SELECTOR, ".has-cursor-pointer:nth-child(4) .edit-photo").click()
106
+ # 39 | runScript | window.scrollTo(0,0) |
107
+ self.driver.execute_script("window.scrollTo(0,0)")
108
+ # 40 | click | css=.icon-font:nth-child(4) |
109
+ self.driver.find_element(By.CSS_SELECTOR, ".icon-font:nth-child(4)").click()
110
+ # 41 | runScript | window.scrollTo(0,349) |
111
+ self.driver.execute_script("window.scrollTo(0,349)")
112
+ # 42 | click | linkText=My Blog |
113
+ self.driver.find_element(By.LINK_TEXT, "My Blog").click()
114
+ # 43 | runScript | window.scrollTo(0,0) |
115
+ self.driver.execute_script("window.scrollTo(0,0)")
116
+ # 44 | click | css=.jsx-2674725205:nth-child(7) .jsx-2745941253 > .jsx-2745941253 |
117
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-2674725205:nth-child(7) .jsx-2745941253 > .jsx-2745941253").click()
118
+ # 45 | click | css=.jsx-2745941253 > .jsx-2674725205:nth-child(1) |
119
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-2745941253 > .jsx-2674725205:nth-child(1)").click()
120
+ # 46 | click | css=.button-container |
121
+ self.driver.find_element(By.CSS_SELECTOR, ".button-container").click()
122
+ # 47 | runScript | window.scrollTo(0,1392) |
123
+ self.driver.execute_script("window.scrollTo(0,1392)")
124
+ # 48 | click | css=.jsx-2674725205:nth-child(8) .jsx-2745941253 > .jsx-2745941253 |
125
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-2674725205:nth-child(8) .jsx-2745941253 > .jsx-2745941253").click()
126
+ # 49 | click | css=.jsx-2745941253 > .jsx-2674725205:nth-child(1) |
127
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-2745941253 > .jsx-2674725205:nth-child(1)").click()
128
+ # 50 | click | css=.button-container |
129
+ self.driver.find_element(By.CSS_SELECTOR, ".button-container").click()
130
+ # 51 | runScript | window.scrollTo(0,1392) |
131
+ self.driver.execute_script("window.scrollTo(0,1392)")
132
+ # 52 | click | linkText=Massages & Rates |
133
+ self.driver.find_element(By.LINK_TEXT, "Massages & Rates").click()
134
+ # 53 | click | css=.jsx-200115206:nth-child(5) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2) |
135
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(5) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2)").click()
136
+ # 54 | type | css=.jsx-200115206:nth-child(5) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2) | 239
137
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(5) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2)").send_keys("239")
138
+ # 55 | click | css=.jsx-200115206:nth-child(5) .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2) |
139
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(5) .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2)").click()
140
+ # 56 | type | css=.jsx-200115206:nth-child(5) .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2) | 279
141
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(5) .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2)").send_keys("279")
142
+ # 57 | click | css=.jsx-200115206:nth-child(3) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2) |
143
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(3) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2)").click()
144
+ # 58 | type | css=.jsx-200115206:nth-child(3) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2) | 239
145
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(3) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2)").send_keys("239")
146
+ # 59 | click | css=.jsx-200115206:nth-child(3) .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2) |
147
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(3) .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2)").click()
148
+ # 60 | type | css=.jsx-200115206:nth-child(3) .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2) | 269
149
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(3) .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2)").send_keys("269")
150
+ # 61 | click | css=.jsx-200115206:nth-child(2) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2) |
151
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(2) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2)").click()
152
+ # 62 | type | css=.jsx-200115206:nth-child(2) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2) | 233
153
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(2) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(1) > .jsx-200115206:nth-child(2)").send_keys("233")
154
+ # 63 | click | css=.jsx-200115206:nth-child(2) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2) |
155
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(2) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2)").click()
156
+ # 64 | type | css=.jsx-200115206:nth-child(2) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2) | 269
157
+ self.driver.find_element(By.CSS_SELECTOR, ".jsx-200115206:nth-child(2) > .jsx-200115206 > .jsx-200115206 > .jsx-200115206:nth-child(2) > .jsx-200115206:nth-child(2)").send_keys("269")
158
+ # 65 | click | name=incallPrice |
159
+ self.driver.find_element(By.NAME, "incallPrice").click()
160
+ # 66 | type | name=incallPrice | 230
161
+ self.driver.find_element(By.NAME, "incallPrice").send_keys("230")
162
+ # 67 | click | name=outcallPrice |
163
+ self.driver.find_element(By.NAME, "outcallPrice").click()
164
+ # 68 | type | name=outcallPrice | 269
165
+ self.driver.find_element(By.NAME, "outcallPrice").send_keys("269")
166
+ # 69 | click | css=.Rates |
167
+ self.driver.find_element(By.CSS_SELECTOR, ".Rates").click()
168
+ # 70 | click | css=.is-justify-content-flex-end > .jsx-1644775375 |
169
+ self.driver.find_element(By.CSS_SELECTOR, ".is-justify-content-flex-end > .jsx-1644775375").click()
170
+
rent_test.py ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from selenium import webdriver
2
+ from selenium.webdriver.support.ui import WebDriverWait
3
+ from selenium.webdriver.support import expected_conditions as EC
4
+ from selenium.webdriver.common.by import By
5
+ from selenium.webdriver.common.keys import Keys
6
+ import time
7
+
8
+ driver = webdriver.Firefox()
9
+ driver.maximize_window()
10
+
11
+ try:
12
+ # Test: rent
13
+ driver.get("https://rentmasseur.com/")
14
+ driver.set_window_size(1309, 753)
15
+
16
+ # Dismiss common overlays (e.g., cookie banners, modals)
17
+ try:
18
+ # Wait for cookie banner to appear and dismiss it
19
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".cookie-banner .accept-button"))).click()
20
+ except:
21
+ pass # No cookie banner found
22
+
23
+ try:
24
+ # Wait for any modal overlay to disappear
25
+ WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((By.CSS_SELECTOR, ".modal-overlay")))
26
+ except:
27
+ pass # No modal overlay found
28
+
29
+ # Click on first navbar link
30
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".navbar-column > .jsx-2001960601:nth-child(1) > .navigation-link-text"))).click()
31
+
32
+ # Email field interaction
33
+ email_field = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "email")))
34
+ email_field.click()
35
+ email_field.send_keys("Karpathianwolf")
36
+ email_field.send_keys(Keys.ENTER)
37
+
38
+ # Password field interaction
39
+ password_field = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "password")))
40
+ password_field.click()
41
+ password_field.send_keys("Lola369!")
42
+
43
+ # Click switch and button
44
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".switch"))).click()
45
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".jsx-1345806167 > .button"))).click()
46
+
47
+ # Click various UI elements
48
+ try:
49
+ # Wait for overlay to disappear before clicking
50
+ WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((By.CSS_SELECTOR, ".overlay")))
51
+ except:
52
+ pass # No overlay found
53
+
54
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".status-icon-green"))).click()
55
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".navigation-link > .icon-available")))
56
+
57
+ # Select hours
58
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".has-width-50per:nth-child(2) > .jsx-2753549060 > .jsx-2753549060"))).click()
59
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".jsx-2753549060:nth-child(6)"))).click()
60
+
61
+ # Scroll and click buttons
62
+ driver.execute_script("window.scrollTo(0,110)")
63
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, "My Interview"))).click()
64
+ driver.execute_script("window.scrollTo(0,0)")
65
+
66
+ # Rate adjustment
67
+ incall = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.NAME, "incallPrice")))
68
+ incall.click()
69
+ incall.send_keys("230")
70
+
71
+ outcall = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.NAME, "outcallPrice")))
72
+ outcall.click()
73
+ outcall.send_keys("269")
74
+
75
+ # Save rates
76
+ WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".is-justify-content-flex-end > .jsx-1644775375"))).click()
77
+
78
+ finally:
79
+ time.sleep(5)
80
+ driver.quit()
81
+