I am working on the following code. what I need next is to fill something in the search box and click 'Google Search' button to go next page in python code, not manually input and click the button.
wx.html2 webview can launch webpage in wx.Panel, that is what I need. But it seems cannot fill and post request. Any other modules can do it? Thanks.
wx.html2 webview can launch webpage in wx.Panel, that is what I need. But it seems cannot fill and post request. Any other modules can do it? Thanks.
import wx import wx.grid import wx.html2 as webview class LeftPanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent=parent) self.current = "https://www.google.com" self.frame = self.GetTopLevelParent() self.titleBase = self.frame.GetTitle() sizer = wx.BoxSizer(wx.VERTICAL) self.wv = webview.WebView.New(self) sizer.Add(self.wv, 1, wx.EXPAND) self.SetSizer(sizer) self.wv.LoadURL(self.current) class RightPanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent=parent) self.grid = wx.grid.Grid(self, size=(278, 150), pos=(0,0)) self.grid.CreateGrid(5,20) class Frame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, title="Search", size=(1600, 860), pos = (0, 0)) splitter = wx.SplitterWindow(self) splitter.SetMinimumPaneSize(1000) splitter.SplitVertically(LeftPanel(splitter), RightPanel(splitter)) if __name__ == "__main__": app = wx.App() win = Frame() win.Show() app.MainLoop()