当前位置: 首页 > news >正文

做矿产公司的网站单位门户网站是什么意思

做矿产公司的网站,单位门户网站是什么意思,沧州企业网站专业定制,wordpress主题php代码示例 下面的代码示例将讲解如何使用Ranorex API来编写代码模块,或者是使用用户代码来扩展录制的模块。 在代码中使用对象库 使用对象库等待UI元素 建立Adapter来访问更多的属性和方法 为对象库元素建立一组Adapter 使用Validate类 强制一个测试用例失败 设置aut…

代码示例
下面的代码示例将讲解如何使用Ranorex API来编写代码模块,或者是使用用户代码来扩展录制的模块。
在代码中使用对象库
使用对象库等待UI元素
建立Adapter来访问更多的属性和方法
为对象库元素建立一组Adapter
使用Validate类
强制一个测试用例失败
设置automation speed
访问测试用例和测试簇的上下文
高级代码示例
如果做基于图像的自动化
如何查找和比较图像
处理意外的对话框

在代码中使用对象库

C#
[TestModule(“D451F1D1-C347-4B58-939F-F6187642EB56”, ModuleType.UserCode, 1)]
public class UsingRepository : ITestModule
{
// Repository object to access UI elements 用来访问UI元素的对象库对象
MyFirstTestProjectRepository repo = MyFirstTestProjectRepository.Instance;
/// <summary>
/// Constructs a new instance.  创建一个新实例
/// </summary>
public UsingRepository()
{
// Do not delete – a parameterless constructor is required! 不要删,需要无参构造器
}
void ITestModule.Run()
{
Mouse.DefaultMoveTime = 300;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.0;
// Using Ranorex.Form adapter represented by ‘MyApp’  用Ranorex.Form adapter来表示MyApp
// ‘MyApp’ is used as a folder within the repository;  MyApp是对象库中的文件夹
// the ‘Self’ property returns an object of type Ranorex.Form self用来返回对象
// Activates application 激活应用
repo.MyApp.Self.Activate();
// Log ‘Active’ state 记录状态
Report.Info(repo.MyApp.Self.Active.ToString());
// Maximize, Minimize and Restore 最大化,最小化,复原大小
repo.MyApp.Self.Maximize();
repo.MyApp.Self.Minimize();
repo.MyApp.Self.Restore();
// Closes application 关闭应用
repo.MyApp.Self.Close();
// Using Ranorex.Button adapter represented by ‘ButtonAdd’
// Read and log value of ‘Text’ attribute
Report.Info(repo.MyApp.Buttons.ButtonAdd.Text);
// Press button 按下按钮
repo.MyApp.Buttons.ButtonAdd.Press();
// Read and log value of ‘Enabled’ attribute 读取并记录属性
Report.Info(repo.MyApp.Buttons.ButtonAdd.Enabled.ToString());
// Using Ranorex.RadioButton adapter
// represented by ‘GenderOption’
// Select radio button 选择radio button
repo.MyApp.GenderOption.Select();
// Accessing listitems of Ranorex.List adapter
// represented by ‘CategoryList’
IList<ranorex.listitem> listItems = repo.MyApp.CategoryList.Items;
foreach ( Ranorex.ListItem item in listItems )
{
Report.Info(item.Text + ” is member of CategoryList”);
}
// Using Ranorex.MenuItem to open ‘File’ menu
repo.MyApp.MenuItemFile.Select();
// Selecting sub menu item ‘Connect’
repo.FileMenu.Connect.Select();
// Read and log ‘Enabled’ state of menu item ‘Connect’
Report.Info(repo.FileMenu.Connect.Enabled.ToString());
}
}
VB.NET
Public Class UsingRepository
Implements ITestModule
‘ Repository object to access UI elements
Private repo As MyFirstTestProjectRepository = MyFirstTestProjectRepository.Instance
”’ <summary>
”’ Constructs a new instance.
”’ </summary>
‘ Do not delete – a parameterless constructor is required!
Public Sub New()
End Sub
”’ <summary>
”’ Performs the playback of actions in this module.
”’ </summary>
”’ <remarks>You should not call this method directly, instead pass the module
”’ instance to the <see cref=”TestModuleRunner.Run(ITestModule)”> method
”’ that will in turn invoke this method.</see></remarks>
Private Sub ITestModule_Run() Implements ITestModule.Run
Mouse.DefaultMoveTime = 300
Keyboard.DefaultKeyPressTime = 100
Delay.SpeedFactor = 1.0
‘ Using Ranorex.Form adapter represented by ‘MyApp’
‘ ‘MyApp’ is used as a folder within the repository;
‘ the ‘Self’ property returns a Ranorex.Form object
‘ Activates application
repo.MyApp.Self.Activate()
‘ Log ‘Active’ state
Report.Info(repo.MyApp.Self.Active.ToString())
‘ Maximize, Minimize and Restore
repo.MyApp.Self.Maximize()
repo.MyApp.Self.Minimize()
repo.MyApp.Self.Restore()
‘ Closes application
repo.MyApp.Self.Close()
‘ Using Ranorex.Button adapter represented by ButtonAdd’
‘ Read and log value of ‘Text’ attribute
Report.Info(repo.MyApp.Buttons.ButtonAdd.Text)
‘ Press button
repo.MyApp.Buttons.ButtonAdd.Press()
‘ Read and log value of ‘Enabled’ attribute
Report.Info(repo.MyApp.Buttons.ButtonAdd.Enabled.ToString())
‘ Using Ranorex.RadioButton adapter
‘ represented by ‘GenderOption’
‘ Select radio button
repo.MyApp.GenderOption.[Select]()
‘ Accessing listitems of Ranorex.List adapter
‘ represented by ‘CategoryList’
Dim listItems As IList(Of Ranorex.ListItem) = repo.MyApp.CategoryList.Items
For Each item As Ranorex.ListItem In listItems
Report.Info(item.Text & ” is member of CategoryList”)
Next
‘ Using Ranorex.MenuItem to open ‘File’ menu
repo.MyApp.MenuItemFile.[Select]()
‘ Selecting sub menu item ‘Connect’
repo.FileMenu.Connect.[Select]()
‘ Read and log ‘Enabled’ state of menu item ‘Connect’
Report.Info(repo.FileMenu.Connect.Enabled.ToString())
End Sub
End Class
 

http://www.yayakq.cn/news/926629/

相关文章:

  • 百科网站建设ui设计课程内容
  • 外贸 网站建设网页编辑栏无法写入
  • 什么网站做h5不收费查网站注册信息
  • 网站开发流程图和介绍广州手机网站定制信息
  • 英才简历在线制作网站网站建设 海豚弯
  • 济南营销型网站公司公司内部展厅设计
  • 立网站系网站开发和室内制作
  • 京东网上购物官方网站泰安网站建设策划方案
  • 安徽建设工程信息网查询平台蔡庆树sem和seo
  • 域名 空间 网站制作网站设计文案 范例
  • 深圳狮科网站建设服装设计就业前景如何
  • 网站模板 哪家好全屋定制包括设计吗
  • 云南网站备案查询陕西农产品网站建设
  • 永久开源的免费建站系统微博推广渠道
  • 产品设计优秀网站多国语言网站模板
  • 网站设计公司 龙岗专门网页制作工具
  • 和平手机网站建设dedecms 网站安装
  • windows 建设网站安徽网站建设网站运营
  • 软件开发项目风险有哪些百度seo免费推广教程
  • 项目网站基础设施建设wordpress主机配置
  • 多种语言网站哪家公司建设网站好
  • 深圳勘察设计协会网站做网页网站 的公司
  • 河池网站建设服务手机壳在线设计网站
  • 营销型网站核心要素有哪些专业做网站哪家便宜
  • 新建网站解析域名网站导航功能
  • wordpress邮件失败郑州官网seo技术
  • 上海装修公司做网站市场宣传的方法有哪些
  • html5网站开发教程重庆石柱网站设计公司
  • 网站 ftp信息seo怎样新建网站
  • 网站功能项目报价统计wordpress访问