File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
py/selenium/webdriver/common/bidi Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ class BidiEvent(BidiObject):
4848 def __init__ (self , * args , ** kwargs ):
4949 super ().__init__ (* args , ** kwargs )
5050
51+ @classmethod
52+ def from_json (cls , json ):
53+ params = cls .param_class .from_json (json )
54+ return cls (params )
55+
5156
5257@dataclass
5358class BidiCommand (BidiObject ):
Original file line number Diff line number Diff line change @@ -165,10 +165,7 @@ class BeforeRequestSent(BidiEvent):
165165 params : BeforeRequestSentParameters
166166 method : typing .Literal ["network.beforeRequestSent" ] = "network.beforeRequestSent"
167167
168- @classmethod
169- def from_json (cls , json ):
170- params = BeforeRequestSentParameters .from_json (json )
171- return cls (params )
168+ param_class = BeforeRequestSentParameters
172169
173170
174171@dataclass
You can’t perform that action at this time.
0 commit comments