-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtestable-info.rb
executable file
·65 lines (49 loc) · 1.51 KB
/
testable-info.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env ruby
$LOAD_PATH << "./lib"
require "testable"
require "rspec"
# rubocop:disable Style/MixinUsage
include RSpec::Matchers
# rubocop:enable Style/MixinUsage
puts Testable::VERSION
puts "================================="
puts "Testable's Version"
puts "================================="
puts Testable.version
puts "================================="
puts "Testable's Dependencies"
puts "================================="
puts Testable.dependencies
puts "================================="
puts "Testable's API"
puts "================================="
puts Testable.api
class Home
include Testable
end
Testable.start_browser :firefox, headless: true
page = Home.new
expect(Testable.browser).to be_an_instance_of(Watir::Browser)
expect(Testable.browser.driver).to be_an_instance_of(
Selenium::WebDriver::Firefox::Marionette::Driver
)
expect(page).to be_a_kind_of(Testable)
expect(page).to be_an_instance_of(Home)
puts "================================="
puts "Testable's Watir API"
puts "================================="
puts Testable.watir_api
puts "================================="
puts "Testable's Selenium API"
puts "================================="
puts Testable.selenium_api
puts "================================="
puts "Testable's Definition API"
puts "================================="
puts page.definition_api
puts "================================="
puts "Testable's Elements"
puts "================================="
puts Testable.elements?
puts Testable.recognizes?("div")
Testable.quit_browser