本帖最后由 kirk_xie 于 2013-7-31 11:10 编辑
好帖子 我是个新手 有个地方不明白 为什么core目录里面有pageClass.au3和pageObject.au3两个文件,而且还定义了相同的函数NewPage() 不会有冲突吗?;Title: pageClass.au3
[code];
;License:
; This script is distributed under the GNU General Public License 3.
;
;Author:
; BlueDuck Team | [email]contact@blueducktesting.com[/email] | <[url]http://blueducktesting.com[/url]>
;
;Description:
;Support for Page model,Page model is a pattern that maps a UI page to a class.
#Region Page Class
Global $oPage = NewPage()
Func NewPage()
Local $oClassObject = _AutoItObject_Class()
$oClassObject.Create()
;Methods
With $oClassObject
.AddMethod("setDataProvider", "_wrapper_setDataProvider")
EndWith
;Property
With $oClassObject
.AddProperty("url", $ELSCOPE_PUBLIC, "")
.AddProperty("result",$ELSCOPE_PUBLIC, 0)
.AddProperty("resultDescription", $ELSCOPE_PUBLIC, "")
EndWith
Return $oClassObject.object
EndFunc ;==>NewPage
#EndRegion Page Class
;Title: pageObject.au3
;
;License:
; This script is distributed under the GNU General Public License 3.
;
;Author:
; BlueDuck Team | [email]contact@blueducktesting.com[/email] | <[url]http://blueducktesting.com[/url]>
;
;Description:
;Support for PageObjects pattern
#Region Page Class
Global $oPage = NewPage()
Func NewPage()
Local $oClassObject = _AutoItObject_Class()
$oClassObject.Create()
;Property
With $oClassObject
.AddProperty("url", $ELSCOPE_PUBLIC, "")
.AddProperty("result",$ELSCOPE_PUBLIC, 0)
.AddProperty("resultDescription", $ELSCOPE_PUBLIC, "")
EndWith
Return $oClassObject.object
EndFunc ;==>NewPage
#EndRegion Page Class
|