def __init__(self, agent_client: AgentClient, remote_server_addr: str):
        RemoteConnection.__init__(self, remote_server_addr=remote_server_addr)
        ReportingCommandExecutor.__init__(self,
                                          agent_client=agent_client,
                                          command_executor=self)

        self.w3c = agent_client.agent_session.dialect == "W3C"
Example #2
0
 def __init__(self,
              remote_server_addr,
              vendor_prefix,
              browser_name,
              keep_alive=True,
              ignore_proxy=False):
     RemoteConnection.__init__(self,
                               remote_server_addr,
                               keep_alive,
                               ignore_proxy=ignore_proxy)
     self.browser_name = browser_name
     self._commands["launchApp"] = (
         'POST', '/session/$sessionId/chromium/launch_app')
     self._commands["setNetworkConditions"] = (
         'POST', '/session/$sessionId/chromium/network_conditions')
     self._commands["getNetworkConditions"] = (
         'GET', '/session/$sessionId/chromium/network_conditions')
     self._commands['executeCdpCommand'] = (
         'POST', '/session/$sessionId/{}/cdp/execute'.format(vendor_prefix))
     self._commands['getSinks'] = (
         'GET',
         '/session/$sessionId/{}/cast/get_sinks'.format(vendor_prefix))
     self._commands['getIssueMessage'] = (
         'GET', '/session/$sessionId/{}/cast/get_issue_message'.format(
             vendor_prefix))
     self._commands['setSinkToUse'] = (
         'POST',
         '/session/$sessionId/{}/cast/set_sink_to_use'.format(vendor_prefix)
     )
     self._commands['startTabMirroring'] = (
         'POST', '/session/$sessionId/{}/cast/start_tab_mirroring'.format(
             vendor_prefix))
     self._commands['stopCasting'] = (
         'POST',
         '/session/$sessionId/{}/cast/stop_casting'.format(vendor_prefix))
Example #3
0
    def __init__(self, remote_server_addr, keep_alive=True):
        RemoteConnection.__init__(self, remote_server_addr, keep_alive)

        self._commands["SET_CONTEXT"] = ("POST", "/session/$sessionId/moz/context")
        self._commands["ELEMENT_GET_ANONYMOUS_CHILDREN"] = \
            ("POST", "/session/$sessionId/moz/xbl/$id/anonymous_children")
        self._commands["ELEMENT_FIND_ANONYMOUS_ELEMENTS_BY_ATTRIBUTE"] = \
            ("POST", "/session/$sessionId/moz/xbl/$id/anonymous_by_attribute")
Example #4
0
 def __init__(self, remote_server_addr, keep_alive=True):
     RemoteConnection.__init__(self, remote_server_addr, keep_alive)
     self._commands["launchApp"] = (
         'POST', '/session/$sessionId/chromium/launch_app')
     self._commands["setNetworkConditions"] = (
         'POST', '/session/$sessionId/chromium/network_conditions')
     self._commands["getNetworkConditions"] = (
         'GET', '/session/$sessionId/chromium/network_conditions')
 def __init__(self, agent_client: AgentClient, remote_server_addr: str):
     RemoteConnection.__init__(self, remote_server_addr=remote_server_addr)
     ReportingCommandExecutor.__init__(
         self,
         agent_client=agent_client,
         command_executor=self,
         remote_connection=super(),
     )
    def __init__(self, remote_server_addr, keep_alive=True):
        RemoteConnection.__init__(self, remote_server_addr, keep_alive)

        self._commands["GET_PERMISSIONS"] = (
            'GET', '/session/$sessionId/apple/permissions')
        self._commands["SET_PERMISSIONS"] = (
            'POST', '/session/$sessionId/apple/permissions')
        self._commands["ATTACH_DEBUGGER"] = (
            'POST', '/session/$sessionId/apple/attach_debugger')
Example #7
0
 def __init__(self, remote_server_addr, keep_alive=True):
     RemoteConnection.__init__(self, remote_server_addr, keep_alive)
     self._commands["launchApp"] = ('POST', '/session/$sessionId/chromium/launch_app')
     self._commands["setNetworkConditions"] = ('POST', '/session/$sessionId/chromium/network_conditions')
     self._commands["getNetworkConditions"] = ('GET', '/session/$sessionId/chromium/network_conditions')
     self._commands['executeCdpCommand'] = ('POST', '/session/$sessionId/goog/cdp/execute')
     self._commands['getSinks'] = ('GET', '/session/$sessionId/goog/cast/get_sinks')
     self._commands['getIssueMessage'] = ('GET', '/session/$sessionId/goog/cast/get_issue_message')
     self._commands['setSinkToUse'] = ('POST', '/session/$sessionId/goog/cast/set_sink_to_use')
     self._commands['startTabMirroring'] = ('POST', '/session/$sessionId/goog/cast/start_tab_mirroring')
     self._commands['stopCasting'] = ('POST', '/session/$sessionId/goog/cast/stop_casting')
Example #8
0
    def __init__(self, remote_server_addr, keep_alive=True):
        RemoteConnection.__init__(self, remote_server_addr, keep_alive)

        self._commands["GET_CONTEXT"] = ('GET', '/session/$sessionId/moz/context')
        self._commands["SET_CONTEXT"] = ("POST", "/session/$sessionId/moz/context")
        self._commands["ELEMENT_GET_ANONYMOUS_CHILDREN"] = \
            ("POST", "/session/$sessionId/moz/xbl/$id/anonymous_children")
        self._commands["ELEMENT_FIND_ANONYMOUS_ELEMENTS_BY_ATTRIBUTE"] = \
            ("POST", "/session/$sessionId/moz/xbl/$id/anonymous_by_attribute")
        self._commands["INSTALL_ADDON"] = \
            ("POST", "/session/$sessionId/moz/addon/install")
        self._commands["UNINSTALL_ADDON"] = \
            ("POST", "/session/$sessionId/moz/addon/uninstall")
        self._commands["FULL_PAGE_SCREENSHOT"] = \
            ("GET", "/session/$sessionId/moz/screenshot/full")
Example #9
0
    def __init__(self,
                 remote_server_addr,
                 keep_alive=True,
                 ignore_proxy=False):
        RemoteConnection.__init__(self,
                                  remote_server_addr,
                                  keep_alive,
                                  ignore_proxy=ignore_proxy)

        self._commands["GET_CONTEXT"] = ('GET',
                                         '/session/$sessionId/moz/context')
        self._commands["SET_CONTEXT"] = ("POST",
                                         "/session/$sessionId/moz/context")
        self._commands["INSTALL_ADDON"] = \
            ("POST", "/session/$sessionId/moz/addon/install")
        self._commands["UNINSTALL_ADDON"] = \
            ("POST", "/session/$sessionId/moz/addon/uninstall")
        self._commands["FULL_PAGE_SCREENSHOT"] = \
            ("GET", "/session/$sessionId/moz/screenshot/full")
    def __init__(self, host, firefox_profile, firefox_binary=None, timeout=30):
        self.profile = firefox_profile
        self.binary = firefox_binary
        HOST = host
        if self.binary is None:
            self.binary = FirefoxBinary()

        if HOST is None:
            HOST = "127.0.0.1"

        PORT = utils.free_port()
        self.profile.port = PORT
        self.profile.update_preferences()

        self.profile.add_extension()

        self.binary.launch_browser(self.profile)
        _URL = "http://%s:%d/hub" % (HOST, PORT)
        RemoteConnection.__init__(self, _URL, keep_alive=True)
Example #11
0
    def __init__(self, host, firefox_profile, firefox_binary=None, timeout=30):
        self.profile = firefox_profile
        self.binary = firefox_binary
        HOST = host
        if self.binary is None:
            self.binary = FirefoxBinary()

        if HOST is None:
            HOST = "127.0.0.1"

        PORT = utils.free_port()
        self.profile.port = PORT 
        self.profile.update_preferences()
        
        self.profile.add_extension()

        self.binary.launch_browser(self.profile)
        _URL = "http://%s:%d/hub" % (HOST, PORT)
        RemoteConnection.__init__(
            self, _URL, keep_alive=True)
Example #12
0
 def __init__(self, remote_server_addr, keep_alive=True):
     RemoteConnection.__init__(self, remote_server_addr, keep_alive)
     self._commands["startScreencast"] = (
         'POST', '/session/$sessionId/chromedriver-proxy/screencast/start')
     self._commands["stopScreencast"] = (
         'POST', '/session/$sessionId/chromedriver-proxy/screencast/stop')
     self._commands["getScreencastPath"] = (
         'GET', '/session/$sessionId/chromedriver-proxy/screencast/path')
     self._commands["getScreencastS3"] = (
         'GET', '/session/$sessionId/chromedriver-proxy/screencast/s3')
     self._commands["setHeaders"] = (
         'POST', '/session/$sessionId/chromedriver-proxy/headers')
     self._commands["addScript"] = (
         'POST', '/session/$sessionId/chromedriver-proxy/script')
     self._commands["removeAllScripts"] = (
         'DELETE', '/session/$sessionId/chromedriver-proxy/scripts')
     self._commands["setClearStorage"] = (
         'POST', '/session/$sessionId/chromedriver-proxy/storage')
     self._commands["navigate"] = (
         'POST', '/session/$sessionId/chromedriver-proxy/navigate')
Example #13
0
 def __init__(self, remote_server_addr, keep_alive=True):
     RemoteConnection.__init__(self, remote_server_addr, keep_alive)
     self._commands["launchApp"] = (
         'POST', '/session/$sessionId/chromium/launch_app')
     self._commands["setNetworkConditions"] = (
         'POST', '/session/$sessionId/chromium/network_conditions')
     self._commands["getNetworkConditions"] = (
         'GET', '/session/$sessionId/chromium/network_conditions')
     self._commands['executeCdpCommand'] = (
         'POST', '/session/$sessionId/goog/cdp/execute')
     self._commands['getSinks'] = (
         'GET', '/session/$sessionId/goog/cast/get_sinks')
     self._commands['getIssueMessage'] = (
         'GET', '/session/$sessionId/goog/cast/get_issue_message')
     self._commands['setSinkToUse'] = (
         'POST', '/session/$sessionId/goog/cast/set_sink_to_use')
     self._commands['startTabMirroring'] = (
         'POST', '/session/$sessionId/goog/cast/start_tab_mirroring')
     self._commands['stopCasting'] = (
         'POST', '/session/$sessionId/goog/cast/stop_casting')
Example #14
0
 def __init__(self, remote_server_addr, keep_alive=True):
     RemoteConnection.__init__(self, remote_server_addr, keep_alive)
     self._commands["launchApp"] = ('POST', '/session/$sessionId/chromium/launch_app')
Example #15
0
 def __init__(self, timeout=_DEFAULT_TIMEOUT):
     RemoteConnection.__init__(
         self, "http://localhost:%d/hub" % _DEFAULT_PORT)
     LOGGER.debug("extension connection initiated")
     self.timeout = timeout
Example #16
0
 def __init__(self, remote_server_addr, thrift_client, keep_alive=False):
     RemoteConnection.__init__(self, remote_server_addr, keep_alive)
     self.thrift_client = thrift_client
     self.session_id = None
Example #17
0
 def __init__(self, remote_server_addr, keep_alive=True):
     RemoteConnection.__init__(self, remote_server_addr, keep_alive)
     self._commands["SET_CONTEXT"] = ('POST',
             '/session/$sessionId/moz/context')
    def __init__(self, remote_server_addr, keep_alive=True):
        RemoteConnection.__init__(self, remote_server_addr, keep_alive)

        self._commands["GET_PERMISSIONS"] = ('GET', '/session/$sessionId/apple/permissions')
        self._commands["SET_PERMISSIONS"] = ('POST', '/session/$sessionId/apple/permissions')
        self._commands["ATTACH_DEBUGGER"] = ('POST', '/session/$sessionId/apple/attach_debugger')
 def __init__(self, remote_server_addr, keep_alive=True):
     RemoteConnection.__init__(self, remote_server_addr, keep_alive)
     self._commands["launchApp"] = ('POST', '/session/$sessionId/chromium/launch_app')
     self._commands["setNetworkConditions"] = ('POST', '/session/$sessionId/chromium/network_conditions')
     self._commands["getNetworkConditions"] = ('GET', '/session/$sessionId/chromium/network_conditions')
     self._commands['executeCdpCommand'] = ('POST', '/session/$sessionId/goog/cdp/execute')
 def __init__(self, remote_server_addr, keep_alive=True):
     RemoteConnection.__init__(self, remote_server_addr, keep_alive)
     self._commands["launchApp"] = (
         'POST', '/session/$sessionId/chromium/launch_app')