Usefull code pices for HG API, like list if important URLs and navigation helpers.

class hangout_api.utils.Participant(name, profile_id)
name

Alias for field number 0

profile_id

Alias for field number 1

class hangout_api.utils.Timeouts[source]

Timeouts helper, contain set of used timeouts for easier management

class hangout_api.utils.Utils(browser)[source]

Batch of function to navigate through G+ Hangout to keep main API class cleaner

browser = None

Instance of the seleniumwrapper library

click_cancel_button_if_there_is_one(timeout=1)[source]

If somewhere on page is visible “cancel” or “close” button, this method will click on it

click_menu_element(xpath, func='xpath')[source]

Make items menu to show out if it is hidden and click on its element provided by ‘xpath’ argumet

click_on_devices_save_button()[source]

Clicks on button with text “Save”

is_logged_in

Returns True if user is loged in, otherwise returns False. Be careful this function analyzing current URL to determinate if user loged in or not.

navigate_to_devices_settings()[source]

Opens dialog box for device setting in HG call.

set_text(node, text)[source]

Helper to remove text from input and then set text to it. Takes xpath or selenium node and text.

hangout_api.utils.click_on_app_icon(browser, xpath, func='xpath')[source]

Clicks on app icon on menu panel

hangout_api.utils.names_cleaner(name)[source]

Helper function to clean up string from ‘thml’ symbols

hangout_api.utils.silence_contextmanager(node)[source]

Context manager to preform operations ‘silently’

hangout_api.utils.tries_n_time_until_true(func, try_num=10)[source]

Helper that repeats some action unlit its returns something different from False or None. Returns Function result