Open mathisspark912 opened 4 days ago
Thanks for reporting. The root issue is related to #48 :+1::
In Camoufox, all of Playwright's JavaScript runs in an isolated context. This prevents Playwright from running JavaScript that writes to the main world/context of the page.
While this is helpful with preventing detection of the Playwright page agent, it causes some issues with native Playwright functions like setting file inputs, executing JavaScript, adding page init scripts, etc. These features might need to be implemented separately.
Ok but what do you mean by implemented separately ?
That you need to implement them in future version of your lib ?
Or during my test case i need to instanciate a regular Playwright object to do what Camoufox does not manage to do ?
Ok but what do you mean by implemented separately ?
That you need to implement them in future version of your lib ?
Or during my test case i need to instanciate a regular Playwright object to do what Camoufox does not manage to do ?
I'll need to implement them in a future version of Camoufox to support it.
At the moment, it's not possible to set file inputs in the browser through Playwright or the Camoufox library.
Or if it is easier to implement, maybe a feature to temporarily disable isloation then reactivate it (i do not know if this make sense on a technical point of view, i did not studied your source code and i am not an expert on browser like implementation).
But for sure, for people not simply using your solution for web scraping but running automated scenarios, filling forms, uploading files or even executing javascript natively with playwright, we need a way to run JS, otherwise it will not be possible to use your solution in production in the future.
This is the only limitation i found on the moment, i tested your solution on specific websites where other open source or even commercial anti-detect browsers failed and your solution gives better results.
Describe the bug:
This existing code was working using Playwright or undetected_browser :
Using Camoufox() raises now an exception, like if Camoufox() was changing the default behavior of Playwright and especially the way input[type=file] are managed.
The exception is ::
ElementHandle.set_input_files: Protocol error (Page.describeNode): error in channel "content::10/16/4": exception while running method "describeNode" in namespace "page": frame.domWindow() is undefined _describeNode@chrome://juggler/content/content/PageAgent.js:418:30 _onMessageInternal@chrome://juggler/content/SimpleChannel.js:237:37 _onMessage@chrome://juggler/content/SimpleChannel.js:194:12 bindToActor/actor.receiveMessage@chrome://juggler/content/SimpleChannel.js:39:44
Version:
Pip package: v0.3.2 Camoufox: v130.0.1-beta.13 (Up to date!)