timmyc Posted July 23, 2015 Posted July 23, 2015 Hi all,Firstly thanks for your help.I am using an autoit script to copy and paste a user name into a search field, the search results often include multiple results however i want to select the one that is the correct user. In the attached example you can see i searched for FRAZERR and it came back with three results, one of which is the user i want to click on. I cannot use a mouse click to select the correct user because the spot i need to click on will change (as multiple results come back). So i wanted to search for text in this window (once it finds the text, then click on it) however when i use the AutoIt Window Info i do not see the text in the visible text and the hidden text tab which makes me think that i cannot search for this text. I have included a screenshot of the 'control' tab of the AutoIt Window Info tool.Anyone have any ideas on how to search for text in this type of window and then mouse click on this text?ThanksTim
J2TeaM Posted July 23, 2015 Posted July 23, 2015 I think you can use IE UDF with _IELinkClickByText function. My UDF/Example Scripts: Imgur UDF | AutoIt & PHP/MySQL | Font Icon UDF | Awesome AutoIt My Blog: https://junookyo.blogspot.com/
timmyc Posted July 23, 2015 Author Posted July 23, 2015 Thanks for your reply!I tried a number of different scripts along the lines of the following with no luck:#include <IE.au3> Local $oIE = WinActivate("uLearn - Administration Tools - Windows Internet Explorer") _IELinkClickByText($oIE, "FRAZERR", 1)and#include <IE.au3> WinActivate("uLearn - Administration Tools - Windows Internet Explorer") _IELinkClickByText("uLearn - Administration Tools - Windows Internet Explorer", "FRAZERR", 1)Also trying the following as there are two places where the text is mentioned_IELinkClickByText($oIE, "FRAZERR") and _IELinkClickByText($oIE, "FRAZERR", 1)It activates the existing Ulearn window but doesn't click anything.Any idea?
kaisies Posted July 23, 2015 Posted July 23, 2015 The persons name is Frazer, not FRAZERR, perhaps that's failing.
timmyc Posted July 26, 2015 Author Posted July 26, 2015 Thanks for your suggestion but i have tried with "FRAZERR" (searching for user name), "Frazer, Ryan" (full name) & "Frazer" with no luck. I don't think any text on this page is search able unfortunately. That or i am doing it wrong.
junkew Posted July 27, 2015 Posted July 27, 2015 Please check with simplespy tool in examples iuiautomation thread or check with ie.udf. in general you can access everything in internet explorer although spy tools will fool you initially. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now