Exemplo n.º 1
0
def getLocationvalue():
    location = driver.find_element_by_xpath('//*[@id="X3"]').get_attribute('value')
    company = driver.find_element_by_xpath('//*[@id="X23"]').get_attribute('value')
    country = driver.find_element_by_xpath('//*[@id="X45"]').get_attribute('value')
    address = driver.find_element_by_xpath('//*[@id="X21"]').get_attribute('value')
    comments = driver.find_element_by_xpath('//*[@id="X55"]').get_attribute('value')
    city = driver.find_element_by_xpath('//*[@id="X33"]').get_attribute('value')
    timeZone = driver.find_element_by_xpath('//*[@id="X53"]').get_attribute('value')
    # 打印SM200的数据
    # print('SM-DATA-LIST')
    # print('Location: ' + location)
    # print('Company code: ' + company)
    # print('Country: ' + country.upper())
    # print('--------------------------')
    if location == Location_tab.name() \
            and company == Location_tab.company() \
            and country.upper() == Location_tab.country()\
            and city == Location_tab.city()\
            and timeZone == Location_tab.timeZone()\
            and comments == Location_tab.comments():
        print('Company code: '+ company + ', Location: '+ location + ', Country: '+ country + ', City: '+ city  + ', TimeZone: '+ timeZone + ' Comments: '+ comments)
    else:
        print('No Record Found')
Exemplo n.º 2
0
def getLDSSlocation():
    list = [Location_tab.name(), Location_tab.country(), Location_tab.city(), Location_tab.company()]