25
25
class Selectors :
26
26
def __init__ (self , loop : asyncio .AbstractEventLoop , dispatcher_fiber : Any ) -> None :
27
27
self ._loop = loop
28
- self ._contextsForSelectors : Set [BrowserContext ] = set ()
29
- self ._selectorEngines : List [Dict ] = []
28
+ self ._contexts_for_selectors : Set [BrowserContext ] = set ()
29
+ self ._selector_engines : List [Dict ] = []
30
30
self ._dispatcher_fiber = dispatcher_fiber
31
- self ._testIdAttributeName : Optional [str ] = None
31
+ self ._test_id_attribute_name : Optional [str ] = None
32
32
33
33
async def register (
34
34
self ,
@@ -44,16 +44,16 @@ async def register(
44
44
engine : Dict [str , Any ] = dict (name = name , source = script )
45
45
if contentScript :
46
46
engine ["contentScript" ] = contentScript
47
- for context in self ._contextsForSelectors :
47
+ for context in self ._contexts_for_selectors :
48
48
await context ._channel .send (
49
- "registerSelectorEngine" , dict ( selectorEngine = engine )
49
+ "registerSelectorEngine" , { " selectorEngine" : engine }
50
50
)
51
- self ._selectorEngines .append (engine )
51
+ self ._selector_engines .append (engine )
52
52
53
53
def set_test_id_attribute (self , attributeName : str ) -> None :
54
54
set_test_id_attribute_name (attributeName )
55
- self ._testIdAttributeName = attributeName
56
- for context in self ._contextsForSelectors :
55
+ self ._test_id_attribute_name = attributeName
56
+ for context in self ._contexts_for_selectors :
57
57
context ._channel .send_no_reply (
58
58
"setTestIdAttributeName" , {"testIdAttributeName" : attributeName }
59
59
)
0 commit comments