-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtesting01.py
More file actions
21 lines (17 loc) · 843 Bytes
/
testing01.py
File metadata and controls
21 lines (17 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import time
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
#driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
class DemoFindElement():
def locate_by_xpath(self):
driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
driver.maximize_window()
driver.get("https://secure.yatra.com/social/common/yatra/register")
driver.find_element(By.XPATH, "//input[@id='login-input']").send_keys("8149979901")
time.sleep(5)
find = DemoFindElement()
find.locate_by_xpath()
print("Search completed. Press Ctrl+C to close the browser window.")
input("Press Enter to continue...")