def get_viewstate_value(page):
    """
    Find for content of the viewState param in source code
    :param page: The code of the page for search in it
    :return: The content of the viewstate param or None
    """
    page = str(page).replace("\\n", "\n")
    full_param = "name=\"javax.faces.ViewState\""

    for i in page.strip().split('\n'):

        tokens = i.strip().split(" ")

        for t in tokens:

            # get param value
            if full_param in t:
                index = tokens.index(full_param)
                if 'value=\"' in tokens[index+1]:
                    obj = tokens[index+1].split("\"")[1]
                    return obj
                elif tokens[index+2]:
                    obj = tokens[index+2].split("\"")[1]
                    return obj

    return None