• TestComplete实测Flex


    1、TestComplete提供了已经编译好的Flex界面,可以直接使用:

    http://support.smartbear.com/samples/testcomplete9/flex/orders.html

    打开即可测试。

    2、TestComplete已经有了写好的代码,位于TestComplete 9 SamplesOpen ApplicationsFlex下,

    其中有多种语言编写的代码,可以参考。

    使用tc打开工程,可以直接运行。

    但是这里面的代码已经做过了namemapping,所以如果要拷贝出来用,还有点问题。

    3、

    ----------

    function AddNewOrder(Orders)
    {
      var editorder;
      //Orders.OrdersPanel.Buttonbar.NewOrder.ClickButton();
      Orders.orders("orders").ButtonBar("Bar").ButtonBarButton("New Order").ClickButton();
      //editorder = Orders.Editorder;
      editorder = Orders.editorder("Edit Order")
      //editorder.ComboboxProduct.ClickItem("FamilyAlbum");
      editorder.ComboBox("Product").ClickItem("FamilyAlbum");
      //editorder.EditQuant.Textinput.FlexObject.text = "4";
      editorder.NumericStepper("edit_quant").TextInput(0).FlexObject.text = "4";
      //editorder.EditDate.TextInput.FlexObject.text = aqConvert.DateTimeToFormatStr(aqDateTime.Today(), "%d/%m/%y");
      editorder.DateField("edit_date").TextInput(0).FlexObject.text = aqConvert.DateTimeToFormatStr(aqDateTime.Today(), "%d/%m/%y");
      //editorder.EditDateex.TextInput.FlexObject.text = aqConvert.DateTimeToFormatStr(aqDateTime.AddMonths(aqDateTime.Today(), 1), "%d/%m/%y");
      editorder.DateField("edit_dateex").TextInput(0).FlexObject.text = aqConvert.DateTimeToFormatStr(aqDateTime.AddMonths(aqDateTime.Today(), 1), "%d/%m/%y");
      //editorder.EditCname.FlexObject.text = "John Black";
      editorder.TextInput("CustomerName").FlexObject.text = "John Black";
      //editorder.EditStreet.FlexObject.text = "Light street";
      editorder.TextInput("edit_street").FlexObject.text = "Light street";
      editorder.TextInput("edit_city").FlexObject.text = "Rain city";
      editorder.TextInput("edit_state").FlexObject.text = "US";
      editorder.TextInput("edit_zip").FlexObject.text = "123456";
      editorder.RadioButton("VISA").ClickButton();
      editorder.TextInput("edit_cardnr").FlexObject.text = "1324354657";
      editorder.Button("btnOk").ClickButton();
    }
     
    function Main()
    {
      var page, URL, Orders;
      URL = "http://support.smartbear.com/samples/testcomplete9/flex/orders.html";
      Browsers.Item(btIExplorer).Run(URL);
      //TestedApps.iexplore.Run();
      //Browsers.Item(btIExplorer).Navigate(URL);
      page = Aliases.browser;
      page.pageOrders.Wait();
      Orders = page.Page(URL).Object("orders");
      //
      AddNewOrder(Orders);
      EditOrder(Orders, 6);
      //LogRow(Orders.OrdersPanel.DataGrid, 6);
      //DeleteOrder(Orders, 9);
      //
      page.BrowserWindow.Close();
    }


    ---------------

  • 相关阅读:
    Delphi 正则表达式之TPerlRegEx 类的属性与方法(2): 关于子表达式
    Delphi 正则表达式语法(7): 匹配转义字符
    Delphi 正则表达式之TPerlRegEx 类的属性与方法(1): 查找
    Delphi 正则表达式语法(5): 边界
    Delphi 正则表达式语法(8): 引用子表达式 也叫反向引用
    Delphi 正则表达式语法(3): 匹配范围
    Delphi 正则表达式语法(6): 贪婪匹配与非贪婪匹配
    Delphi 正则表达式语法(9): 临界匹配 也叫"预搜索"与"反向预搜索"
    Delphi 正则表达式语法(10): 选项
    善用 Web 调试代理工具
  • 原文地址:https://www.cnblogs.com/riskyer/p/3310587.html
Copyright © 2020-2023  润新知