如何使用Selenium2库在乘坐机器人框架的动态表中添加数据

如何使用Selenium2库在乘坐机器人框架的动态表中添加数据,selenium,robotframework,Selenium,Robotframework,你好,我是测试新手。我想通过在动态生成的表中添加值来测试应用程序。请帮助我如何增加表中的价值,使用机器人框架和乘坐 *Settings* Library Selenium2Library ** Variables ** ${AddWhiteCityCode} Pune ** Test Cases ** Click AddWhiteCity Click AddWhiteCity ** Keywords ** Click AddWhiteCity

你好,我是测试新手。我想通过在动态生成的表中添加值来测试应用程序。请帮助我如何增加表中的价值,使用机器人框架和乘坐

*Settings*

 Library Selenium2Library  

 ** Variables **

 ${AddWhiteCityCode}    Pune

 ** Test Cases **

 Click AddWhiteCity
  Click AddWhiteCity

 ** Keywords **

   Click AddWhiteCity

      Input Text    xpath=(//td[contains(@class,"addWhiteCity"')])[1]  ${AddWhiteCityCode}
我尝试了上述语法,但给出了无效的Xpath语法错误 请帮忙

多谢各位

对不起,这是复制粘贴错误,我没有在我的代码单报价

这是我的实际代码


Input Text xpath=(//td[contains(@class,“addWhiteCity”))[1]${AddWhiteCityCode}
您有单引号。因此,您将得到无效的xpath错误

xpath=(//td[contains(@class,"addWhiteCity")])[1]

删除xpath中的单引号。这可能有用。