Python-UIAutomation-for-Windows
Python-UIAutomation-for-Windows copied to clipboard
Read firefox and Edge browser url
trafficstars
Hi, I have tried to read the URL values in the firefox browser.
win = auto.PaneControl(Depth=1, ClassName='MozillaWindowClass', SubName='Mozilla Firefox')
temp = win.PaneControl(Depth=1, Name=browser).GetChildren()[1].GetChildren()[0]
for bar in temp.GetChildren():
last = bar.GetLastChildControl()
if last and last.Name != '':
break
addr_bar = bar.GroupControl(Depth=1, Name='').EditControl()
url = addr_bar.GetValuePattern().Value
When I try to run the above code receiving following error message,
"LookupError: Find Control Timeout: {Depth: 1, ClassName: 'MozillaWindowClass', SubName: 'Firefox', ControlType: PaneControl}"
May I know how to fix the above error and read url value from Firefox and Edge.
Thanks.