WinBatch® Technical Support Forum

Archived Boards => WinBatch Script Exchange => Topic started by: JTaylor on October 14, 2014, 09:21:03 PM

Title: Retrieve Current URL from Chrome - .NET
Post by: JTaylor on October 14, 2014, 09:21:03 PM
I previously posted a solution and version 38 breaks that code so here is an update.  I think this will work with earlier versions as well as I figured out how to make it a bit more flexible and far more simple...at least it worked with version 37.   No good way to test earlier stuff though...or maybe there is and I'm just lazy.  In any event, here it is...

Jim
Title: Re: Retrieve Current URL from Chrome - .NET
Post by: Wordhewer on January 30, 2015, 10:39:28 PM
Will this work with Firefox?
Title: Re: Retrieve Current URL from Chrome - .NET
Post by: JTaylor on January 31, 2015, 06:18:33 AM
I'm sure you could take a similar approach but, as it is, No, it will not work.    This steps through the windows/controls in Chrome and looks for a specific name and its value.   Can't say for certain but it probably wouldn't be that hard to adjust to what you need.   Trying to think what tool I used to get the needed info but coming up blank.   If I can remember I'll post again.

Jim
Title: Re: Retrieve Current URL from Chrome - .NET
Post by: kdmoyers on February 04, 2015, 05:56:08 AM
Thanks Jim!!!
Title: Re: Retrieve Current URL from Chrome - .NET
Post by: JTaylor on February 04, 2015, 07:02:04 AM
I cannot figure out what tool I used to get the needed control name info.  Probably isn't hard to find something to do the job.   Sorry :-(

Jim
Title: Re: Retrieve Current URL from Chrome - .NET
Post by: td on February 04, 2015, 10:51:19 AM
I believe the Windows SDK tool inspect.exe is what is commonly used to examine processes for UI Automation element information.  However, Firefox's support for UI Automation is not always robust so getting consistent and timely results isn't always possible.
Title: Re: Retrieve Current URL from Chrome - .NET
Post by: JTaylor on February 04, 2015, 11:51:33 AM
That was it.

Thanks.

Jim