-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
'''I want to pick date from calendar and want to click on "Search for Bus ''' ||| link to the Website this
So far this is my code :
from selenium.webdriver.common.by import By
from selenium_extensions.core import SeleniumDriver
from selenium.webdriver import ActionChains
class KSRTCBOT(SeleniumDriver):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def goto_ksrtc(self):
self.driver.get('http://www.ksrtc.in/oprs-web/')
leaving_from = (By.ID, 'fromPlaceName')
going_to = (By.ID, 'toPlaceName')
date_of_departure = (By.ID, 'txtJourneyDate')
pick_date_from_calender = (By.ID, 'ui-state-default')
self.wait_for_element_to_be_present(leaving_from)
self.wait_for_element_to_be_present(going_to)
self.wait_for_element_to_be_present(date_of_departure)
self.populate_text_field(leaving_from, 'Bengaluru')
self.populate_text_field(going_to, 'Belagavi')
#self.populate_text_field(date_of_departure, '11/09/2017')
#my_browser = (browser='chrome', executable_path = '/usr/local/share/chromedriver', headless = True)
bot = KSRTCBOT(browser='chrome', executable_path = '/usr/local/share/chromedriver')
bot.goto_ksrtc()
#bot.shutdown
Metadata
Metadata
Assignees
Labels
No labels