class AdminModule::Pages::WorkflowTasksPage
Public Instance Methods
add()
click to toggle source
Add a task - browses to the ‘new’ task page.
Returns the Task Details page object (so methods can be chained).
# File lib/admin_module/pages/workflow_tasks_page.rb, line 58 def add self.add_button # Return the page object of the next page. detail_page end
get_dynamic_url()
click to toggle source
# File lib/admin_module/pages/workflow_tasks_page.rb, line 19 def get_dynamic_url AdminModule.configuration.base_url + "/admin/security/WorkflowTasks.aspx?act=2" end
get_tasks()
click to toggle source
Return an array of task names
# File lib/admin_module/pages/workflow_tasks_page.rb, line 36 def get_tasks get_tasks_and_ids.keys end
modify(name)
click to toggle source
Modify a task - browses to the task details page.
Returns the Task Details page object (so methods can be chained).
# File lib/admin_module/pages/workflow_tasks_page.rb, line 46 def modify name tasks = get_tasks_and_ids detail_page tasks[name] end
Private Instance Methods
detail_page(id = nil)
click to toggle source
Return a page object for the Task Detail page
To edit a specific task, pass an id. The browser will navigate to the task edit url.
# File lib/admin_module/pages/workflow_tasks_page.rb, line 101 def detail_page id = nil unless id.nil? navigate_to AdminModule.configuration.base_url + "/admin/security/WorkflowTask.aspx?TaskID=#{id}" end WorkflowTaskPage.new(@browser, false) end
get_tasks_and_ids()
click to toggle source
Return a hash of task names and ids
ex: { ‘Some Task Name’ => 24 }
The ID can be used to edit a specific task.
# File lib/admin_module/pages/workflow_tasks_page.rb, line 83 def get_tasks_and_ids task_names = Hash.new Nokogiri::HTML(@browser.html).css("#ctl00_cntPlh_dgrTasks>tbody>tr").each do |tr| id = tr['taskid'] name = tr.css("td:nth-child(1)").text task_names[name] = id end # css task_names end
tasks_table()
click to toggle source
Not used at this time, but this is a valid reference to the task details table.
# File lib/admin_module/pages/workflow_tasks_page.rb, line 71 def tasks_table table_elements[0].table_elements[1] end