Tag: browser automation

用来存储Excel文件数据variables的variables是否被破坏? JavaScript的

我目前正在使用JavaScript / TestComplete开发一个关键字驱动的框架,并有一个Excel文件,其中包含一个步骤编号,描述,关键字,定位器和数据。 我目前正在从Excel文件(.xlsx)中读取数据并将数据(在本例中为定位符)存储在一个variables中。 我存储stringBrowsers.Item(btlExplorer,“”,Browsers.pX64在一个名为locator的variables。当我然后尝试这个:locator.Run( https://www.google.ie/?gws_rd=ssl#spf= 1 );我收到此错误:JavaScript运行时错误TypeError。getLocator(…)。运行不是一个函数。 这是我的getLocator函数: function getLocator(x){ var driver; var value; driver = DDT.ExcelDriver("C:\\Users\\Username\\Desktop\\Automation Framework.xlsx", "Sheet1", false); while (! driver.EOF() && driver.Value(0) != x){ DDT.CurrentDriver.Next(); } value = driver.Value(3); Log.Message(value); DDT.CloseDriver(driver.Name); return value; } 这里是我正在运行的function: function openGoogle() { //Launches the specified browser and opens the specified URL in it. getLocator(1).Run("https://www.google.ie/?gws_rd=ssl#spf=1"); } […]