Saturday, July 6, 2019

Click hyperlink using Selenium Python in IBM Sterling WMS

Click hyperlink using Selenium Python in IBM Sterling WMS

Step used to achieve:


1. Open Internet Explorer Browser (IBM Sterling works fine in this Browser)
2. Open Login Screen
3. Input Username and Password to Login
4. Click Login form
5. Identify the hyperlink using link text and click it

from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.by import By
import time

driver = webdriver.Ie()
driver.get("http://localhost:7001/smcfs/console/login.jsp")
driver.fullscreen_window

# Set value to Username
userName  = driver.find_element_by_name("UserId")
userName.send_keys("xyz")

# Set value to Password
passWord  = driver.find_element_by_name("Password")
passWord.send_keys("abcd")

# Submit the Form
submitForm  = driver.find_element_by_name("btnLogin")
submitForm.click()

time.sleep(3)

#Open Favorite link
continue_link = driver.find_element_by_link_text('MyFavoriteShipments').click()

No comments:

Post a Comment

Popular Posts