Perform Adjust Location Inventory using Selenium Python
2. Open Location Inventory Console
3. Open Search Panel
4. Input ItemID in search panel
5. Click Search button
6. Click 4000-01 location from Search result
7. Select 1st record checkbox to Adjust inventory
8. Click AdjustLocationInventory button
9. Input ADJUSTMENT as ReasonCode
10. Select operation as Increase Inventory
11. Enter Quantity to increase as 10
12. Save the details
13. Close the poup window
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 pyautogui, 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("testuser")
# Set value to Password
passWord = driver.find_element_by_name("Password")
passWord.send_keys("testuser")
# Submit the Form
submitForm = driver.find_element_by_name("btnLogin")
submitForm.click()
time.sleep(3)
#Open Location Inventory Console
driver.get("http://localhost:7001/smcfs/console/wmsinventory.detail?yfcShowDetail=Y")
#Open Search Panel
driver.execute_script("slideSearchPanelView();")
# Set value to ItemID
driver.find_element_by_name("xml:yfcSearchCriteria:/NodeInventory/Inventory/InventoryItem/@ItemID").send_keys("XRXXFL2207")
# Click Search button
driver.find_element_by_xpath('//*[@name="btnSearch" and @type="submit"]').click()
# Click Location 4000-01 from Search result
continue_link = driver.find_element_by_link_text('4000-01').click()
# Select checkbox from search result
driver.find_element_by_xpath('//*[@name="chkEntityKey" and @type="checkbox" and @yHiddenInputName2="ItemKey_1"]').click()
# Click AdjustLocationInventory button
driver.find_element_by_id("scbutton2").click()
time.sleep(3)
# Use Pyautogui and enter reasonCode as ADJUSTMENT
pyautogui.press(['tab', 'tab', 'tab'])
pyautogui.typewrite('ADJUSTMENT')
pyautogui.press(['tab', 'tab', 'down', 'tab'])
# Use Pyautogui and enter quantity to increase as 10
pyautogui.typewrite('10')
time.sleep(5)
# Save the details
pyautogui.press(['tab', 'tab', 'tab', 'tab', 'tab', 'tab', 'tab', 'enter'])
time.sleep(5)
# Close popup window
pyautogui.press(['tab', 'tab', 'enter'])
Steps perform below to Adjust Location Inventory:
1. Login into IBM Sterling2. Open Location Inventory Console
3. Open Search Panel
4. Input ItemID in search panel
5. Click Search button
6. Click 4000-01 location from Search result
7. Select 1st record checkbox to Adjust inventory
8. Click AdjustLocationInventory button
9. Input ADJUSTMENT as ReasonCode
10. Select operation as Increase Inventory
11. Enter Quantity to increase as 10
12. Save the details
13. Close the poup window
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 pyautogui, 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("testuser")
# Set value to Password
passWord = driver.find_element_by_name("Password")
passWord.send_keys("testuser")
# Submit the Form
submitForm = driver.find_element_by_name("btnLogin")
submitForm.click()
time.sleep(3)
#Open Location Inventory Console
driver.get("http://localhost:7001/smcfs/console/wmsinventory.detail?yfcShowDetail=Y")
#Open Search Panel
driver.execute_script("slideSearchPanelView();")
# Set value to ItemID
driver.find_element_by_name("xml:yfcSearchCriteria:/NodeInventory/Inventory/InventoryItem/@ItemID").send_keys("XRXXFL2207")
# Click Search button
driver.find_element_by_xpath('//*[@name="btnSearch" and @type="submit"]').click()
# Click Location 4000-01 from Search result
continue_link = driver.find_element_by_link_text('4000-01').click()
# Select checkbox from search result
driver.find_element_by_xpath('//*[@name="chkEntityKey" and @type="checkbox" and @yHiddenInputName2="ItemKey_1"]').click()
# Click AdjustLocationInventory button
driver.find_element_by_id("scbutton2").click()
time.sleep(3)
# Use Pyautogui and enter reasonCode as ADJUSTMENT
pyautogui.press(['tab', 'tab', 'tab'])
pyautogui.typewrite('ADJUSTMENT')
pyautogui.press(['tab', 'tab', 'down', 'tab'])
# Use Pyautogui and enter quantity to increase as 10
pyautogui.typewrite('10')
time.sleep(5)
# Save the details
pyautogui.press(['tab', 'tab', 'tab', 'tab', 'tab', 'tab', 'tab', 'enter'])
time.sleep(5)
# Close popup window
pyautogui.press(['tab', 'tab', 'enter'])
No comments:
Post a Comment