Skip to content

Commit

Permalink
finished
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Soeyadi authored and Ryan Soeyadi committed Sep 3, 2023
1 parent 868c27e commit 8dbbd41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions book.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,9 @@ def get_time_till(hour, min):
submit_button = driver.find_element(By.XPATH, "/html/body/form/div[4]/button")
submit_button.click()

print("Booking finished...")
time.sleep(1)
print("\nClosing now")
driver.close()
while (True): # keep the browser open
pass
9 changes: 6 additions & 3 deletions room_config_generator.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from time import sleep
import config
import os
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
import config
from time import sleep

def generate_xpaths(index):
base_xpath = "/html/body/form/div[2]/div/div[{}]/select[{}]"
Expand Down Expand Up @@ -96,6 +96,9 @@ def generate_xpaths(index):
if "y" not in another_room:
break
rooms.remove(selected_room)
os.system('cls' if os.name == 'nt' else 'clear')



class Room:
def __init__(self, room_number_xpath, hour, min, am_pm, hour_xpath, min_xpath, pm_xpath):
Expand Down

0 comments on commit 8dbbd41

Please sign in to comment.