Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium 如果添加其他脚本,则TestNG文件未读取参数值_Selenium_Webdriver_Testng - Fatal编程技术网

Selenium 如果添加其他脚本,则TestNG文件未读取参数值

Selenium 如果添加其他脚本,则TestNG文件未读取参数值,selenium,webdriver,testng,Selenium,Webdriver,Testng,我试图在一个接一个的不同浏览器中按顺序运行多个测试,为此我在testNg.xml文件中定义了浏览器参数 <test name="iexplore"> <parameter name="browser" value="iexplore"/> <classes> <class name="com.slingmedia.safe.testscripts.BRO_139"/> <class

我试图在一个接一个的不同浏览器中按顺序运行多个测试,为此我在testNg.xml文件中定义了浏览器参数

   <test name="iexplore">
      <parameter name="browser" value="iexplore"/>
      <classes>
        <class name="com.slingmedia.safe.testscripts.BRO_139"/>
       <class name="com.slingmedia.safe.testscripts.BRO_140"/>
      </classes>
 </test>    

它工作正常,使用正确的浏览器,但当我在其他xml文件中定义所有测试并尝试运行时,浏览器值并没有被读取

   <test name="iexplore">
     <parameter name="browser" value="iexplore"/>
      <suites-file>
       <suite path="Sample3.xml" />
      </suites-files>
  </test>   


向我们展示您的Sample3.xml代码。您使用的是哪个testng版本?您是如何运行的?我无法在sample3.xml文件中提供浏览器名称,使用的是最新版本的testn该文件是框架的一部分,它正在读取值并执行