Module: SK
- Extended by:
- SK
- Included in:
- SK
- Defined in:
- lib/shiken.rb
Overview
NOTE: the requires are at bottom
Defined Under Namespace
Modules: Browser, Downloads, Kendo, Trace
Classes: Button, Cell, Clickable, Dropdown, Element, Field, KCell, KElement, KFilter, KGrid, KRow, Link, Page, RadioSet, Row, Table
Instance Method Summary
collapse
Instance Method Details
#driver ⇒ Object
65
66
67
|
# File 'lib/shiken.rb', line 65
def driver
@driver
end
|
#init(seconds = 2, browser = :safari) ⇒ Object
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
|
# File 'lib/shiken.rb', line 17
def init(seconds=2, browser=:safari)
wait = Selenium::WebDriver::Wait.new(:timeout => seconds)
profile = Selenium::WebDriver::Firefox::Profile.new
profile["javascript.enabled"] = false profile['browser.download.dir'] = SK::Downloads.path
profile['browser.download.folderList'] = 2
profile['browser.helperApps.neverAsk.saveToDisk'] = "text/csv,application/pdf,application/xls,image/tiff"
profile['browser.helperApps.alwaysAsk.force'] = false
profile["pdfjs.disabled"] = true
profile["plugin.scan.plid.all"] = false
profile["plugin.scan.Acrobat"] = "99.0"
@driver = Selenium::WebDriver.for(browser)
@driver end
|
#quit ⇒ Object
59
60
61
62
63
|
# File 'lib/shiken.rb', line 59
def quit
driver.quit if driver
@driver = nil
end
|
#version ⇒ Object
11
12
13
14
15
|
# File 'lib/shiken.rb', line 11
def version
v = "0.0.1"
return v
end
|