when i try modify http request header for android chrome browser open new page,I encountered some difficulties, there is some way to do that,according to chrome devtool ,code as follows:
driver.execute_cdp_cmd('Fetch.enable', {
'patterns': [{
'urlPattern': url+"*", # 匹配主页请求的 URL
'resourceType': 'Document' # 只拦截页面请求
}]
})
now ,the question is i do not know listen cdp event ,appium provide that?
Fetch Domain
A domain for letting clients substitute browser's network layer with client code.
Methods
Fetch.continueRequest
Fetch.continueWithAuth
Fetch.disable
Fetch.enable
Fetch.failRequest
Fetch.fulfillRequest
Fetch.getResponseBody
Fetch.takeResponseBodyAsStream
Fetch.continueResponse Experimental
Events
Fetch.authRequired
Fetch.requestPaused
Types
Fetch.AuthChallenge
Fetch.AuthChallengeResponse
Fetch.HeaderEntry
Fetch.RequestId
Fetch.RequestPattern
Fetch.RequestStage
how do i know these events for python appium client