简体   繁体   English

如何将自定义参数传递给 Robot Framework 中的 Connect To DataBase Keyword

[英]How to pass a custom parameter to Connect To DataBase Keyword in Robot Framework

I have been using Connect To DataBase Keyword in Robot Framework.我一直在 Robot Framework 中使用 Connect To DataBase Keyword。 Is it possible to add a custom parameter to the keyword?是否可以向关键字添加自定义参数? For ex : i want to add dictionary=true to cursor instance below is the keyword that i have used -例如:我想在下面的光标实例中添加 dictionary=true 是我使用的关键字 -

EMPDB.Connect To Database pymysql ${EMPNAME} ${EMPUSER} ${PWD} ${HOST} ${PORT} EMPDB.连接数据库pymysql ${EMPNAME} ${EMPUSER} ${PWD} ${HOST} ${PORT}

To Above Keyword statement can i use dictionary=true?上面的关键字语句我可以使用dictionary=true吗? So that when i select query the result i want is along with the column and the values.这样当我选择查询时,我想要的结果就是列和值。

That's is not possible using the library as is, so you need to implement that feature yourself.原样使用库是不可能的,因此您需要自己实现该功能。 Usually DB queries return lists and they do not include column names.通常数据库查询返回列表并且它们不包括列名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM