MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / create

Method create

seleniumbase/undetected/cdp_driver/browser.py:110–146  ·  view source on GitHub ↗

Entry point for creating an instance.

(
        cls,
        config: Config = None,
        *,
        user_data_dir: PathLike = None,
        headless: bool = False,
        incognito: bool = False,
        guest: bool = False,
        browser_executable_path: PathLike = None,
        browser_args: List[str] = None,
        sandbox: bool = True,
        host: str = None,
        port: int = None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

108
109 @classmethod
110 async def create(
111 cls,
112 config: Config = None,
113 *,
114 user_data_dir: PathLike = None,
115 headless: bool = False,
116 incognito: bool = False,
117 guest: bool = False,
118 browser_executable_path: PathLike = None,
119 browser_args: List[str] = None,
120 sandbox: bool = True,
121 host: str = None,
122 port: int = None,
123 **kwargs,
124 ) -> Browser:
125 """Entry point for creating an instance."""
126 if not config:
127 config = Config(
128 user_data_dir=user_data_dir,
129 headless=headless,
130 incognito=incognito,
131 guest=guest,
132 browser_executable_path=browser_executable_path,
133 browser_args=browser_args or [],
134 sandbox=sandbox,
135 host=host,
136 port=port,
137 **kwargs,
138 )
139 try:
140 instance = cls(config)
141 await instance.start()
142 except Exception:
143 time.sleep(0.15)
144 instance = cls(config)
145 await instance.start()
146 return instance
147
148 def __init__(self, config: Config, **kwargs):
149 """

Callers 7

startMethod · 0.95
query_selector_allMethod · 0.80
query_selectorMethod · 0.80
find_elements_by_textMethod · 0.80
find_element_by_textMethod · 0.80
startFunction · 0.80

Calls 3

ConfigClass · 0.85
startMethod · 0.80
sleepMethod · 0.45

Tested by

no test coverage detected