some buttons aren't reacting to clicks

54 views Asked by At

I'm having an issue clicking buttons in spynner. This is what I have so far to load the page:

import spynner
browser = spynner.Browser()
browser.load("http://www.google.com")
browser.show()

The links like Advanced Search work fine, but I can't use the search buttons. How can I fix this? Thanks for the help.

1

There are 1 answers

0
Jurica Penjgušić On

This is code snippet that works. Figure it out.

import spynner

from PyQt4.QtCore import Qt

b = spynner.Browser()
b.show()
b.load("http://www.google.com")
b.wk_fill('input[name=q]', 'soup')


b.sendKeys("input[name=q]",[Qt.Key_Enter])
b.browse()