Class: Proj
- Inherits:
-
Object
show all
- Defined in:
- lib/TCLib.rb
Instance Method Summary
collapse
Constructor Details
#initialize(proj_file) ⇒ Proj
Returns a new instance of Proj.
43
44
45
46
47
48
49
50
51
|
# File 'lib/TCLib.rb', line 43
def initialize(proj_file)
@tc = TC.new
@integration = @tc.integration
raise("Test Complete is already Running a test") if(@integration.IsRunning)
if (!@integration.IsProjectSuiteOpened || @integration.ProjectSuiteFileName != proj_file)
@suite = @integration.OpenProjectSuite(proj_file)
end
raise "can't open project" unless @integration.IsProjectSuiteOpened
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &blk) ⇒ Object
97
98
99
|
# File 'lib/TCLib.rb', line 97
def method_missing(meth, *args, &blk)
TCFramework.new(meth.to_s, @tc)
end
|
Instance Method Details
#get_control_automation_path_from_location(x, y, include_text) ⇒ Object
58
59
60
61
62
63
|
# File 'lib/TCLib.rb', line 58
def get_control_automation_path_from_location(x,y,include_text)
sys = @integration.GetObjectByName("Sys")
sys.Refresh
objTest = sys.Desktop.ObjectFromPoint( x, y )
get_automation_path(objTest, include_text)
end
|
#get_current_control_automation_path(include_text = true) ⇒ Object
53
54
55
56
|
# File 'lib/TCLib.rb', line 53
def get_current_control_automation_path(include_text = true)
sys = @integration.GetObjectByName("Sys")
get_control_automation_path_from_location(sys.Desktop.MouseX, sys.Desktop.MouseY, include_text)
end
|