#NEWLINE# def test_hrm006_add_staff_to_office( self ) : #NEWLINE# #INDENT# '\n            @case: HRM006\n            @description: Add a premade made staff to an Office\n\n            @TestDoc: https://docs.google.com/spreadsheet/ccc?key=0AmB3hMcgB-3idG1XNGhhRG9QWF81dUlKLXpJaFlCMFE\n            @Test Wiki: http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/Testing\n        ' #NEWLINE# browser = self . browser #NEWLINE# config = self . config #NEWLINE# self . login ( account = 'admin' , nexturl = 'org/office' ) #NEWLINE# self . dt_filter ( 'AP Zone' ) #NEWLINE# self . dt_action ( ) #NEWLINE# url = browser . current_url #NEWLINE# url_parts = url . split ( '/' ) #NEWLINE# try : #NEWLINE# #INDENT# org_id = int ( url_parts [ ( - 2 ) ] ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# org_id = int ( url_parts [ ( - 1 ) ] ) #NEWLINE# #UNINDENT# browser . get ( ( '%s/org/office/%s/human_resource' % ( config . url , org_id ) ) ) #NEWLINE# add_btn = self . browser . find_elements_by_id ( 'show-add-btn' ) #NEWLINE# if ( len ( add_btn ) > 0 ) : #NEWLINE# #INDENT# add_btn [ 0 ] . click ( ) #NEWLINE# #UNINDENT# select_from_registry_btn = self . browser . find_element_by_id ( 'select_from_registry' ) #NEWLINE# select_from_registry_btn . click ( ) #NEWLINE# self . create ( 'hrm_human_resource' , [ ( 'person_id' , 'Beatriz de Carvalho' ) ] )