i am trying to display the selected text in QwebView browser with javascript. but i dont know why its not working.. here is my code:-
frame = self.page().mainFrame().documentElement()
frame.evaluateJavaScript("alert("+"'"+frame.getSelection().toString()+"'"+");")
when i am running this code it shows me the error:-
Traceback (most recent call last):
File "GUI-Test.py", line 32, in slotshowxpath
frame.evaluateJavaScript("alert("+"'"+frame.getSelection().toString()+"'"+");")
AttributeError: 'QWebElement' object has no attribute 'getSelection'