Can anyone help me with Zomato login test script using Python Selenium Webdriver?

0 votes
Can anyone help me with Zomato login test script using Python Selenium Webdriver?
Jul 29 in Selenium by Laxmikant
41 views

1 answer to this question.

0 votes

Hi Laxmikant, if you want to write an automation test script to test Zomato's login functionality, you can use following sample code for the help:

from selenium import webdriver
import time

browser = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome\chromedriver.exe")

browser.maximize_window()

browser.get('https://www.zomato.com / ncr')

time.sleep(3)

username = "test"
password = "test"
browser.find_element_by_xpath("//a[@id ='signin-link']").click()
time.sleep(2)

browser.find_element_by_xpath("//a[@id ='login-email']").click()

user = browser.find_element_by_xpath("//input[@id ='ld-email']")
user.send_keys(username)

pass = browser.find_element_by_xpath("//input[@id ='ld-password']")
pass.send_keys(password)

browser.find_element_by_xpath("//input[@id ='ld-submit-global']").click()

print('Login Successful')
browser.close()
answered Jul 29 by Anvi
• 11,930 points

Related Questions In Selenium

0 votes
1 answer

Can anyone help me that how to run Selenium WebDriver test cases in Chrome?

Download the executable driver from: ChromeDriver Download Before ...READ MORE

answered Mar 29, 2018 in Selenium by nsv999
• 5,070 points
208 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Installing Selenium Webdriver with Python package

Hey Hemant, for installing Selenium Webdriver with ...READ MORE

answered May 8 in Selenium by Anvi
• 11,930 points
114 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,070 points
443 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
792 views
0 votes
1 answer