module Cbthelper

Constants

VERSION

Public Class Methods

authkey() click to toggle source
# File lib/cbthelper.rb, line 46
def self.authkey
        @@authkey
end
caps() click to toggle source
# File lib/cbthelper.rb, line 50
def self.caps
        @@caps
end
getCapsBuilder() click to toggle source

Used to get the selenium capability builder Generating the CapsBuilder pulls in a large amount of data, so user should not call the constrcutor manually

# File lib/cbthelper.rb, line 14
def self.getCapsBuilder
@@caps = CapsBuilder.new
end
getTestFromId(sessid) click to toggle source

Creates an automated test from the selenium session id @param sessid: string for the seleneium session/test id. Should come from WebDriver

# File lib/cbthelper.rb, line 38
def self.getTestFromId(sessid)
return AutomatedTest.new(sessid)
end
getTestHistory(options) click to toggle source

Returns a ruby hash with the test history, filtering based on the options given. @param options: a ruby hash created by the TestHistoryBuilder

# File lib/cbthelper.rb, line 32
def self.getTestHistory(options)
return JSON.parse(RestClient.get("https://#{@@username}:#{@@authkey}@crossbrowsertesting.com/api/v3/selenium/", params: options))  
end
getTestHistoryBuilder() click to toggle source

Used to get the TestHistoryBuilder Can also just call the constructor. Method created to match getCapsBuilder()

# File lib/cbthelper.rb, line 26
def self.getTestHistoryBuilder
return TestHistoryBuilder.new
end
login(username, authkey) click to toggle source

Sets the username and authkey used to make the HTTP requests

# File lib/cbthelper.rb, line 19
def self.login(username, authkey)
@@username= username
@@authkey = authkey        
end
username() click to toggle source
# File lib/cbthelper.rb, line 42
def self.username
        @@username
end