testnow 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/lib/testnow.rb +21 -0
  3. data/lib/testnow/chrome.rb +13 -0
  4. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d4503b64daad3b1624aa21eca2a7b4df488b905f
4
+ data.tar.gz: 461040a50818435301b29996845f37e98a0114b2
5
+ SHA512:
6
+ metadata.gz: a50c5c9b37e860d5454415ce47d8622e3f35513ccea0c240b7e9affac953209eaefdcb49c9dc4ec3dc3b2e424b7b94bde18558f004508e866ffd03c6c1631628
7
+ data.tar.gz: c098485f8e05006f2cb563a3157a00371ac19f72403c1f4221c41d0b5f31fcd4a488493e9516fd608cc1487e292883aff8e8a4c2e65234d6e4570083a4c1122e
@@ -0,0 +1,21 @@
1
+ module TestNow
2
+
3
+ def init
4
+ ENV['BROWSER'] = "firefox" if ENV['BROWSER'].nil?
5
+ case ENV['BROWSER'].downcase
6
+ when "chrome"
7
+ TestNow.launch_driver_chrome
8
+ when "android"
9
+ launch_driver_android
10
+ when "opera"
11
+ launch_driver_opera
12
+ when "androidchrome"
13
+ launch_driver_android_chrome
14
+ when "ie"
15
+ launch_driver_ie
16
+ else
17
+ launch_driver_firefox
18
+ end
19
+ end
20
+
21
+ end
@@ -0,0 +1,13 @@
1
+ module TestNow
2
+
3
+
4
+ # Chrome Browser
5
+ def launch_driver_chrome
6
+ @driver = Selenium::WebDriver.for :chrome
7
+ @driver.manage.timeouts.implicit_wait = 30
8
+ @driver.manage.timeouts.page_load = 120
9
+ @driver.manage.window.maximize
10
+ return @driver
11
+ end
12
+
13
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: testnow
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kaushal Rupani
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-03-25 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple gem for TestNow
14
+ email: kushrupani@live.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/testnow.rb
20
+ - lib/testnow/chrome.rb
21
+ homepage: https://github.com/krupani/testnow
22
+ licenses: []
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.5.1
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: TestNow helper
44
+ test_files: []