python | 您所在的位置:网站首页 › 网页获取源码是什么 › python |
Python----Yaml数据驱动
Summer Paris: [code=python] # 对输入的空格字符和空字符做判断 if csv_list[i].get(temp_name) == '': new_line = new_line.replace(temp_value.strip(), "''") # 如果输入的是空格就用引号加空格代替 elif csv_list[i].get(temp_name) in ' ': value = "' '" new_line = new_line.replace(temp_value.strip(), value) else: new_line = new_line.replace(temp_value.strip(), csv_list[i].get(temp_name)) [/code] 这里我做了空值和输入空格的判断,因为我的用例中有,不知道这样是否合理呢?我自己测试确实按照我的预想返回了空值和空格字符,没有判断只要是空字符串都是返回None,验证就报错 python-selenium运行报chromedriver与chrome不匹配解决方案cxsljw: from webdriver_manager.chrome import ChromeDriverManager 导入包时报错:Traceback (most recent call last): File "", line 1, in from webdriver_manager.chrome import ChromeDriverManager File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\webdriver_manager\chrome.py", line 7, in from webdriver_manager.drivers.chrome import ChromeDriver File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\webdriver_manager\drivers\chrome.py", line 1, in from packaging import version ModuleNotFoundError: No module named 'packaging' python-selenium运行报chromedriver与chrome不匹配解决方案m0_73519143: 真的可以吗 Python----Yaml数据驱动小秃米: 没有哦,可以自己去B站看看 Python----Yaml数据驱动weixin_43203624: 针对这块内容 有没有学习视频吗? |
CopyRight 2018-2019 实验室设备网 版权所有 |