有一个代码,可以比较使用robot框架点击url时生成的cookie模式, 使用字符串变量
REGMATCH
${string}= set variable hgf
${matches}= get regexp matches ${string} asdfhgfpoyrjgrrhkjhoolk
should be equal as strings ${matches} hgf
但这个结果是错误的
我在下面试过这个
Get Lines Matching Pattern Matching Some Lines
Test Get Lines Matching Pattern asdfhgfpoyrjgrrhkjhoolk ?????? hgf
***KEYWORD***
Test Get Lines Matching Pattern
[Arguments] ${input} ${pattern} ${expected} ${case-insensitive}=no
${actual} = Get Lines Matching Pattern ${input} ${pattern} ${case-insensitive}
Should Be Equal ${actual} ${expected}
有人能帮我吗
您的模式是
?????
,这意味着正好有5个字符,输入超过5个字符asdfhgfpoyrjgrrhkjhoolk可以使用那么多的“?”作为?以全局格式报告一个字符,您可以使用
这意味着整个字符串
对于y=用例,您可以使用
这将检查字符串是否有“123”。这个关键字来自柏林图书馆
下面的示例显示了每个关键字的正确用法:
相关问题 更多 >
编程相关推荐