awetestlib 0.1.10-x86-mingw32 → 0.1.11-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -58,6 +58,8 @@ The full list of parameters for the command line currently are:
58
58
  -x, --excel EXCEL_FILE Specify an excel file containing variables to be loaded
59
59
  -v, --version VERSION Specify a browser version
60
60
 
61
+ To get started writing your own script, refer to the [Getting Started Scripting](https://github.com/3qilabs/awetestlib/wiki/Getting-Started---Scripting) wiki
62
+
61
63
  ### Cucumber Support
62
64
 
63
65
  One of the technologies that the Awetest framework supports is [Cucumber](http://cukes.info/). To get setup with cucumber, you can run the following command: `awetestlib cucumber_setup` which will create your typical cucumber folder structure.
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.add_dependency('i18n')
34
34
  s.add_dependency('rb-appscript')
35
35
  s.add_dependency('json', '1.4.6') #for safari support
36
+ s.add_dependency('pry')
36
37
  s.add_dependency('cucumber')
37
38
  s.require_paths = ["lib"] #,"ext"]
38
39
  s.files = `git ls-files`.split("\n")
@@ -15,17 +15,13 @@ def edit_private_file
15
15
  File.open(@new_private_file, "w") {|file| file.puts new_workspace_text}
16
16
  end
17
17
 
18
- # def rename_project_name
19
- # unless ARGV[1].nil?
20
- # new_dir = File.join(FileUtils.pwd, ARGV[1])
21
- # File.rename (@netbeans_dir, new_dir)
22
- # config_file = File.join(FileUtils.pwd,ARGV[1],"nbproject","private","configs", "Demo.properties")
23
- # workspace_text = File.read(config_file)
24
- # new_workspace_text = workspace_text.gsub("sample_netbeans",ARGV[1])
25
- # File.open(config_file, "w") {|file| file.puts new_workspace_text}
26
- # end
18
+ def edit_project_file
19
+ @new_project_file = File.join(FileUtils.pwd, @proj_dir, "nbproject", "project.xml")
20
+ project_text = File.read(@new_project_file)
21
+ new_project_text = project_text.gsub(/PROJECT-NAME/, @proj_dir)
22
+ File.open(@new_project_file, "w") {|file| file.puts new_project_text}
27
23
 
28
- # end
24
+ end
29
25
 
30
26
 
31
27
  def awetestlib_netbeans_setup
@@ -54,6 +50,7 @@ def awetestlib_netbeans_setup
54
50
  FileUtils.cp_r(@source_dir, @netbeans_dir)
55
51
  edit_config_file
56
52
  edit_private_file
53
+ edit_project_file
57
54
 
58
55
  msg("Info") do
59
56
  puts "Configuring files and settings"
@@ -39,7 +39,7 @@ _Example_
39
39
  when 'FF'
40
40
  @myBrowser = open_ff_for_version
41
41
  when 'S'
42
- aBrowser = Watir::Safari.new
42
+ aBrowser = Watir::Browser.new :safari
43
43
  @myBrowser = aBrowser
44
44
  when 'C', 'GC'
45
45
  @myBrowser = open_chrome
@@ -255,7 +255,9 @@ _Parameters_::
255
255
  browser.window(how, /#{uri_decoded_pattern}/).use
256
256
  tmpbrowser = browser
257
257
  when 'S'
258
- Watir::Safari.attach(how, what)
258
+ browser.driver.switch_to.window(browser.driver.window_handles[0])
259
+ sleep 1
260
+ browser.window(how, /#{uri_decoded_pattern}/).use
259
261
  tmpbrowser = browser
260
262
  when 'C'
261
263
  browser.window(how, /#{uri_decoded_pattern}/).use
@@ -868,7 +870,7 @@ category: Logon
868
870
  when 'FF'
869
871
  myClass =~ /Watir::Browser/i
870
872
  when 'S'
871
- myClass =~ /Watir::Safari/i
873
+ myClass =~ /Watir::Browser/i
872
874
  when 'C'
873
875
  myClass =~ /Watir::Browser/i
874
876
  end
@@ -231,7 +231,7 @@ module Awetestlib
231
231
  end
232
232
 
233
233
  when 'S'
234
- require 'safariwatir'
234
+ require 'watir-webdriver'
235
235
 
236
236
  when 'C', 'GC'
237
237
  require 'watir-webdriver'
data/lib/awetestlib.rb CHANGED
@@ -28,7 +28,7 @@ module Awetestlib
28
28
  require 'awetestlib/runner'
29
29
  require 'andand'
30
30
  require 'awetestlib/regression/runner'
31
-
31
+ require 'pry'
32
32
 
33
33
  if USING_OSX
34
34
  require 'appscript'
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Awetestlib
2
- VERSION = "0.1.10"
3
- VERSION_DATE = "2012-09-04"
2
+ VERSION = "0.1.11"
3
+ VERSION_DATE = "2012-09-06"
4
4
  end
data/license.txt ADDED
@@ -0,0 +1,14 @@
1
+ Copyright (C) 2012 3Qi Labs
2
+
3
+ This program is free software: you can redistribute it and/or modify
4
+ it under the terms of the GNU General Public License as published by
5
+ the Free Software Foundation, either version 3 of the License, or
6
+ (at your option) any later version.
7
+
8
+ This program is distributed in the hope that it will be useful,
9
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ GNU General Public License for more details.
12
+
13
+ You should have received a copy of the GNU General Public License
14
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -3,7 +3,7 @@
3
3
  <type>org.netbeans.modules.ruby.rubyproject</type>
4
4
  <configuration>
5
5
  <data xmlns="http://www.netbeans.org/ns/ruby-project/1">
6
- <name>Netbeans</name>
6
+ <name>PROJECT-NAME</name>
7
7
  <source-roots>
8
8
  <root id="src.dir"/>
9
9
  </source-roots>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awetestlib
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 10
10
- version: 0.1.10
9
+ - 11
10
+ version: 0.1.11
11
11
  platform: x86-mingw32
12
12
  authors:
13
13
  - Anthony Woo
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-09-04 00:00:00 Z
19
+ date: 2012-09-06 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: watir-webdriver
@@ -325,6 +325,7 @@ files:
325
325
  - lib/patches/firewatir.rb
326
326
  - lib/patches/watir.rb
327
327
  - lib/version.rb
328
+ - license.txt
328
329
  - netbeans_setup.md
329
330
  - rdoc_test.bat
330
331
  - rubymine_setup.md