Properties file in python (similar to Java Properties)

后端 未结 25 2819
故里飘歌
故里飘歌 2020-11-29 17:41

Given the following format (.properties or .ini):

propertyName1=propertyValue1
propertyName2=propertyValue2
...
propertyNam         


        
25条回答
  •  隐瞒了意图╮
    2020-11-29 18:24

    create a dictionary in your python module and store everything into it and access it, for example:

    dict = {
           'portalPath' : 'www.xyx.com',
           'elementID': 'submit'}
    

    Now to access it you can simply do:

    submitButton = driver.find_element_by_id(dict['elementID'])
    

提交回复
热议问题