GGUF
conversational
OVERMODEL / rent_test.py
luguog's picture
Upload 2 files
13709d4 verified
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Firefox()
driver.maximize_window()
try:
# Test: rent
driver.get("https://rentmasseur.com/")
driver.set_window_size(1309, 753)
# Dismiss common overlays (e.g., cookie banners, modals)
try:
# Wait for cookie banner to appear and dismiss it
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".cookie-banner .accept-button"))).click()
except:
pass # No cookie banner found
try:
# Wait for any modal overlay to disappear
WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((By.CSS_SELECTOR, ".modal-overlay")))
except:
pass # No modal overlay found
# Click on first navbar link
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".navbar-column > .jsx-2001960601:nth-child(1) > .navigation-link-text"))).click()
# Email field interaction
email_field = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "email")))
email_field.click()
email_field.send_keys("Karpathianwolf")
email_field.send_keys(Keys.ENTER)
# Password field interaction
password_field = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "password")))
password_field.click()
password_field.send_keys("Lola369!")
# Click switch and button
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".switch"))).click()
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".jsx-1345806167 > .button"))).click()
# Click various UI elements
try:
# Wait for overlay to disappear before clicking
WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((By.CSS_SELECTOR, ".overlay")))
except:
pass # No overlay found
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".status-icon-green"))).click()
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".navigation-link > .icon-available")))
# Select hours
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".has-width-50per:nth-child(2) > .jsx-2753549060 > .jsx-2753549060"))).click()
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".jsx-2753549060:nth-child(6)"))).click()
# Scroll and click buttons
driver.execute_script("window.scrollTo(0,110)")
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, "My Interview"))).click()
driver.execute_script("window.scrollTo(0,0)")
# Rate adjustment
incall = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.NAME, "incallPrice")))
incall.click()
incall.send_keys("230")
outcall = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.NAME, "outcallPrice")))
outcall.click()
outcall.send_keys("269")
# Save rates
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".is-justify-content-flex-end > .jsx-1644775375"))).click()
finally:
time.sleep(5)
driver.quit()