viewpoint-particle

Author Topic: Retrieve Current URL from Chrome - .NET  (Read 2748 times)

JTaylor

  • Pundit
  • *****
  • Posts: 806
    • Data & Stuff Inc.
Retrieve Current URL from Chrome - .NET
« 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

Wordhewer

  • Newbie
  • *
  • Posts: 2
Re: Retrieve Current URL from Chrome - .NET
« Reply #1 on: January 30, 2015, 10:39:28 pm »
Will this work with Firefox?

JTaylor

  • Pundit
  • *****
  • Posts: 806
    • Data & Stuff Inc.
Re: Retrieve Current URL from Chrome - .NET
« Reply #2 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

kdmoyers

  • Full Member
  • ***
  • Posts: 183
Re: Retrieve Current URL from Chrome - .NET
« Reply #3 on: February 04, 2015, 05:56:08 am »
Thanks Jim!!!
The mind is everything; What you think, you become.

JTaylor

  • Pundit
  • *****
  • Posts: 806
    • Data & Stuff Inc.
Re: Retrieve Current URL from Chrome - .NET
« Reply #4 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

td

  • Tech Support
  • *****
  • Posts: 2223
    • WinBatch
Re: Retrieve Current URL from Chrome - .NET
« Reply #5 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.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


JTaylor

  • Pundit
  • *****
  • Posts: 806
    • Data & Stuff Inc.
Re: Retrieve Current URL from Chrome - .NET
« Reply #6 on: February 04, 2015, 11:51:33 am »
That was it.

Thanks.

Jim