from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

usernameStr = 'client'
passwordStr = '*2016*'

browser = webdriver.Chrome()
browser.get(('https://fms.logistics.co.ke/'))

# fill in username and hit the next button

username = browser.find_element_by_id('Login1_UserName')
username.send_keys(usernameStr)

# nextButton = browser.find_element_by_id('identifierNext')
# nextButton.click()

# wait for transition then continue to fill items

password = WebDriverWait(browser, 10).until(
    EC.presence_of_element_located((By.ID, 'Login1_Password')))

password.send_keys(passwordStr)

signInButton = browser.find_element_by_id('Login1_LoginButton')
signInButton.click()