Class: ZAPv2::Selenium

Inherits:
Object
  • Object
show all
Defined in:
lib/zap/v2apis/selenium.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Selenium

Returns a new instance of Selenium.



5
6
7
# File 'lib/zap/v2apis/selenium.rb', line 5

def initialize(client)
  @client = client
end

Instance Method Details

#add_browser_argument(argument, enabled) ⇒ Object



49
50
51
# File 'lib/zap/v2apis/selenium.rb', line 49

def add_browser_argument(argument, enabled)
  @client.get("/JSON/selenium/action/addBrowserArgument/?argument=#{argument}&enabled=#{enabled}")
end

#get_browser_argumentsObject



9
10
11
# File 'lib/zap/v2apis/selenium.rb', line 9

def get_browser_arguments
  @client.get('/JSON/selenium/view/getBrowserArguments/')
end

#option_browser_extensionsObject



13
14
15
# File 'lib/zap/v2apis/selenium.rb', line 13

def option_browser_extensions
  @client.get('/JSON/selenium/view/optionBrowserExtensions/')
end

#option_chrome_binary_pathObject



17
18
19
# File 'lib/zap/v2apis/selenium.rb', line 17

def option_chrome_binary_path
  @client.get('/JSON/selenium/view/optionChromeBinaryPath/')
end

#option_chrome_driver_pathObject



21
22
23
# File 'lib/zap/v2apis/selenium.rb', line 21

def option_chrome_driver_path
  @client.get('/JSON/selenium/view/optionChromeDriverPath/')
end

#option_firefox_binary_pathObject



25
26
27
# File 'lib/zap/v2apis/selenium.rb', line 25

def option_firefox_binary_path
  @client.get('/JSON/selenium/view/optionFirefoxBinaryPath/')
end

#option_firefox_default_profileObject



29
30
31
# File 'lib/zap/v2apis/selenium.rb', line 29

def option_firefox_default_profile
  @client.get('/JSON/selenium/view/optionFirefoxDefaultProfile/')
end

#option_firefox_driver_pathObject



33
34
35
# File 'lib/zap/v2apis/selenium.rb', line 33

def option_firefox_driver_path
  @client.get('/JSON/selenium/view/optionFirefoxDriverPath/')
end

#option_ie_driver_pathObject



37
38
39
# File 'lib/zap/v2apis/selenium.rb', line 37

def option_ie_driver_path
  @client.get('/JSON/selenium/view/optionIeDriverPath/')
end

#option_last_directoryObject



41
42
43
# File 'lib/zap/v2apis/selenium.rb', line 41

def option_last_directory
  @client.get('/JSON/selenium/view/optionLastDirectory/')
end

#option_phantom_js_binary_pathObject



45
46
47
# File 'lib/zap/v2apis/selenium.rb', line 45

def option_phantom_js_binary_path
  @client.get('/JSON/selenium/view/optionPhantomJsBinaryPath/')
end

#remove_browser_argument(argument) ⇒ Object



53
54
55
# File 'lib/zap/v2apis/selenium.rb', line 53

def remove_browser_argument(argument)
  @client.get("/JSON/selenium/action/removeBrowserArgument/?argument=#{argument}")
end

#set_browser_argument_enabled(argument, enabled) ⇒ Object



57
58
59
# File 'lib/zap/v2apis/selenium.rb', line 57

def set_browser_argument_enabled(argument, enabled)
  @client.get("/JSON/selenium/action/setBrowserArgumentEnabled/?argument=#{argument}&enabled=#{enabled}")
end

#set_option_chrome_binary_path(string) ⇒ Object



61
62
63
# File 'lib/zap/v2apis/selenium.rb', line 61

def set_option_chrome_binary_path(string)
  @client.get("/JSON/selenium/action/setOptionChromeBinaryPath/?String=#{string}")
end

#set_option_chrome_driver_path(string) ⇒ Object



65
66
67
# File 'lib/zap/v2apis/selenium.rb', line 65

def set_option_chrome_driver_path(string)
  @client.get("/JSON/selenium/action/setOptionChromeDriverPath/?String=#{string}")
end

#set_option_firefox_binary_path(string) ⇒ Object



69
70
71
# File 'lib/zap/v2apis/selenium.rb', line 69

def set_option_firefox_binary_path(string)
  @client.get("/JSON/selenium/action/setOptionFirefoxBinaryPath/?String=#{string}")
end

#set_option_firefox_default_profile(string) ⇒ Object



73
74
75
# File 'lib/zap/v2apis/selenium.rb', line 73

def set_option_firefox_default_profile(string)
  @client.get("/JSON/selenium/action/setOptionFirefoxDefaultProfile/?String=#{string}")
end

#set_option_firefox_driver_path(string) ⇒ Object



77
78
79
# File 'lib/zap/v2apis/selenium.rb', line 77

def set_option_firefox_driver_path(string)
  @client.get("/JSON/selenium/action/setOptionFirefoxDriverPath/?String=#{string}")
end

#set_option_ie_driver_path(string) ⇒ Object



81
82
83
# File 'lib/zap/v2apis/selenium.rb', line 81

def set_option_ie_driver_path(string)
  @client.get("/JSON/selenium/action/setOptionIeDriverPath/?String=#{string}")
end

#set_option_last_directory(string) ⇒ Object



85
86
87
# File 'lib/zap/v2apis/selenium.rb', line 85

def set_option_last_directory(string)
  @client.get("/JSON/selenium/action/setOptionLastDirectory/?String=#{string}")
end

#set_option_phantom_js_binary_path(string) ⇒ Object



89
90
91
# File 'lib/zap/v2apis/selenium.rb', line 89

def set_option_phantom_js_binary_path(string)
  @client.get("/JSON/selenium/action/setOptionPhantomJsBinaryPath/?String=#{string}")
end