In IBM Sterling WMS with version 9x. Hope it will work for lower version too using below code.
After executing below code, it will automatically open Internet Explorer browser -> Open Sterling login screen (pls change URL for your code) -> Target Username field and set as anderson -> Target Password field and set as password and then click -> Submit button which will get logged in into the Sterling application.
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
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
import time
driver = webdriver.Ie()
driver.get("http://localhost:7001/smcfs/console/login.jsp")
#time.sleep(5)
# Set value to Username
userName = driver.find_element_by_name("UserId")
userName.send_keys("anderson")
# Set value to Password
passWord = driver.find_element_by_name("Password")
passWord.send_keys("password")
# Submit the Form
submitForm = driver.find_element_by_name("btnLogin")
submitForm.click()
After executing below code, it will automatically open Internet Explorer browser -> Open Sterling login screen (pls change URL for your code) -> Target Username field and set as anderson -> Target Password field and set as password and then click -> Submit button which will get logged in into the Sterling application.
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
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
import time
driver = webdriver.Ie()
driver.get("http://localhost:7001/smcfs/console/login.jsp")
#time.sleep(5)
# Set value to Username
userName = driver.find_element_by_name("UserId")
userName.send_keys("anderson")
# Set value to Password
passWord = driver.find_element_by_name("Password")
passWord.send_keys("password")
# Submit the Form
submitForm = driver.find_element_by_name("btnLogin")
submitForm.click()
No comments:
Post a Comment