{'mainnav': [{'active': False, 'name': 'project', 'label': <Element "a">}, {'active': False, 'name': 'added_common', 'label': <Element "a">}, {'active': False, 'name': 'admin', 'label': <Element "a">}, {'active': False, 'name': 'reports', 'label': <Element "a">}, {'active': False, 'name': 'metrics', 'label': <Element "a">}, {'active': False, 'name': 'mytimesheet', 'label': <Element "a">}, {'active': True, 'name': 'myprojects', 'label': <Element "a">}, {'active': False, 'name': 'timesheetapproval', 'label': <Element "a">}], 'metanav': [{'active': False, 'name': 'login', 'label': u'logged in as karthikeyan.nagaraja'}, {'active': False, 'name': 'logout', 'label': <Element "a">}, {'active': False, 'name': 'prefs', 'label': <Element "a">}, {'active': False, 'name': 'about', 'label': <Element "a">}]}
Well, I am getting menu as a dictionary as shown below,{'mainnav': [{'active': False, 'name': 'project', 'label': <Element "a">}, {'active': False, 'name': 'added_common', 'label': <Element "a">}, {'active': False, 'name': 'admin', 'label': <Element "a">}, {'active': False, 'name': 'reports', 'label': <Element "a">}, {'active': False, 'name': 'metrics', 'label': <Element "a">}, {'active': False, 'name': 'mytimesheet', 'label': <Element "a">}, {'active': True, 'name': 'myprojects', 'label': <Element "a">}, {'active': False, 'name': 'timesheetapproval', 'label': <Element "a">}], 'metanav': [{'active': False, 'name': 'login', 'label': u'logged in as karthikeyan.nagaraja'}, {'active': False, 'name': 'logout', 'label': <Element "a">}, {'active': False, 'name': 'prefs', 'label': <Element "a">}, {'active': False, 'name': 'about', 'label': <Element "a">}]}
I get this, when I refresh the web page in my browser. These menus are dynamic, differs among different users based on the permissions that they have in system. But I wish to generate this without using a browser. So how can I make a web request handling in program itself and the above menus?
I want to achieve this without making a HTTP request from browser. I guess the chrome.get_navigation_items will work only if there is a web request. Isn't it? Otherwise, I wish to make it without authenticating/bypassing authentication and everything within a python script file. Is this possible? Please share me your ideas.