[PyQt] PyQt bug: choose file dialog sometimes opens instead of QWebPage.chooseFile call

Florian Bruhin me at the-compiler.org
Wed May 14 06:14:55 BST 2014


* Герасимов Михаил <Gerasimov-M-N at yandex.ru> [2014-05-14 08:54:00 +0400]:
> Hello! Sorry for my broken english.
> 
> I emulate click on file upload button in QWebView to automate file
> uploading. On some sites instead of QWebPage.chooseFile function call,
> Windows choose file dialog opens (even if QWebView is hidden). I'm using
> PyQt5.2.1, Windows 7 ×86, python 3.3.
> 
> Is it PyQt bug? Should I report it somewhere? Thanks for help.
> 
> Here is code example:
> 
> [...]

Just a guess, but you might have to also support the
ChooseMultipleFilesExtension:

"This extension is invoked when the web content requests one or more
file names, for example as a result of the user clicking on a "file
upload" button in a HTML form where multiple file selection is
allowed."

http://qt-project.org/doc/qt-4.8/qwebpage.html#Extension-enum

You can find an example how I implemented the ErrorPage extension
here:

http://git.the-compiler.org/qutebrowser/tree/qutebrowser/browser/webpage.py

Florian

-- 
() ascii ribbon campaign - stop html mail    www.asciiribbon.org
/\ www.the-compiler.org  | I love long mails http://email.is-not-s.ms/
Virtue does not always demand a heavy sacrifice -- only the willingness to 
make it when necessary. -- Frederick Dunn 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140514/2a566afd/attachment.sig>


More information about the PyQt mailing list