• Home
  • Raw
  • Download

Lines Matching full:tab

103         # The opened tabs are stored by tab descriptors.
104 # Key is the tab descriptor string.
106 # string to locate the tab object.
107 # Value is the tab object.
165 def _generate_tab_descriptor(tab): argument
166 """Generate tab descriptor by tab object.
168 @param tab: the tab object.
169 @return a str, the tab descriptor of the tab.
172 return hex(id(tab))
187 for tab in browser_tabs:
188 if self._generate_tab_descriptor(tab) not in self._tabs:
191 tab.Close()
193 logging.warn('close tab timeout %r, %s', tab, tab.url)
239 """Loads the given url in a new tab. The new tab will be active.
242 @return a str, the tab descriptor of the opened tab.
245 tab = self._browser.tabs.New()
246 tab.Navigate(url)
247 tab.Activate()
248 tab.WaitForDocumentReadyStateToBeComplete()
249 tab_descriptor = self._generate_tab_descriptor(tab)
250 self._tabs[tab_descriptor] = tab
287 """Gets the tab by the tab descriptor.
289 @returns: The tab object indicated by the tab descriptor.
297 """Closes the tab.
299 @param tab_descriptor: Indicate which tab to be closed.
303 raise RuntimeError('There is no tab for %s' % tab_descriptor)
304 tab = self._tabs[tab_descriptor]
306 tab.Close()
312 """Waits for the given JavaScript expression to be True on the given tab
314 @param tab_descriptor: Indicate on which tab to wait for the expression.
319 raise RuntimeError('There is no tab for %s' % tab_descriptor)
325 """Executes a JavaScript statement on the given tab.
327 @param tab_descriptor: Indicate on which tab to execute the statement.
332 raise RuntimeError('There is no tab for %s' % tab_descriptor)
338 """Evaluates a JavaScript expression on the given tab.
340 @param tab_descriptor: Indicate on which tab to evaluate the expression.
346 raise RuntimeError('There is no tab for %s' % tab_descriptor)