i wrote a (visual basic.net-2008) desktop app that allows ham radio operators to enter a call,
such as WA0H, and the program gives the ham's location (springfield, mo.).
you can download the program free from my website .. www.wa0h.com
i want the program to display the ham's location on a google map using google's api-v3.
i have created an (html/javascript) webpage, where you enter the location in a form box,
click a (find) button, and the app displays the map ok, including a marker pin on the map.
??? how do i run the (webpage) from inside my (vb.net) program ???
my vb.net program needs to:
1 .. pass the address to the webpage
2 .. click the webpage (find) button
according to the google maps (developers) website, they want questions posted to stackoverflow.
thanks for your time.
1-First you need to create pin on the map
i suggest using Google Static Maps API as in hear : https://developers.google.com/maps/documentation/static-maps/intro#quick_example
for the example use this
https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&key=YOUR_API_KEY
then you get something like this
https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&key=AIzaSyDnw6k3UjE2qZ5nLnI8cKghaEEdCXV0PUI&signature=5xiF2jgoXwFonsjew0PmtZdSTHU=
2-you need to open this page using web browser.
to use "WebBrowser" inside of toolbox, drag and drop it then set ScriptErrorsSuppressed to true
to set webbrowser url you can use webbrowser1.navigate("your url as string")
Related
I just need to click on "OK" , the pop up generated by web page , i m not able to perform click operation on pop-up generated by web page in Automation Anywhere
enter image description here
Normally the object Cloning command works on that type of windows, you just need to put the main window of the object cloning as "Message from webpage" instead of the main webpage.
If not Image recognition shpuld work perfectly
You can use selenium. use find_by to locate the popup element.
close_button = driver.find_elements_by_class_name("popover-x-button-close")[0]
close_button.click()
sum_div.click()
driver.implicitly_wait(2)
According to official Whatsapp documenttion, if you want to make a clickable html link that triggers a new chat window in Whatsapp, regardless of (1) the destination phone number being in your contacts or not and (2) of OS (works in Web, iOS and Android), all you have to do is create a link like this:
Click here to open Whatsapp
In Google Chrome / MacOs, if I have Whatsapp Desktop installed, as soon as I click that link, I get a new tab (due to target = blank) with an Whatsapp web page containing a button 'Click here to chat', but Whatsapp Desktop imediatelly intercepts the link and comes to the foreground and creates a new chat with that phone number. That's the behavior I'm hoping for.
On Google Chrome Windows, on the other hand, Whatsapp Desktop doesn't intercept the link, so Whatsapp's web page just sits there waiting for me to click the button. The problem is that every time you click the button, you have to wait for the full Whatsapp WEB (not desktop) to load, which takes forever, specially if use this feature all the time.
I tried using whatsapp:// syntax but it doesn't work in Windows (does nothing when clicked), and in MacOs it triggers Whatsapp Desktop but errors out unless you have that contact in your contact list already (api.whatsapp.com doesn't have this limitation).
In short: any way to make a clickable link that, on Chrome/Windows, will trigger Whatsapp Desktop instead of forcing the user to load (every time) whatsapp web?
Building on Anand's answer, here is a reg file that adds the necessary entries.
Note: Be sure to replace YOUR_USERNAME_HERE with, um, your real Windows user-name:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\whatsapp]
#="URL:whatsapp"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\whatsapp\shell]
#="open"
[HKEY_CLASSES_ROOT\whatsapp\shell\Open]
[HKEY_CLASSES_ROOT\whatsapp\shell\Open\command]
#="\"C:\\Users\\YOUR_USERNAME_HERE\\AppData\\Local\\WhatsApp\\WhatsApp.exe\" %1"
Taking cue from Rovann Linhalis's answer, following settings worked for me in Windows 10 Pro 1809 with WhatsApp Desktop Installed
In HKEY_CLASSES_ROOT create new key whatsapp
Then in HKEY_CLASSES_ROOT\whatsapp change default string value to URL:whatsapp
In HKEY_CLASSES_ROOT\whatsapp add new string value with value name URL Protocol and value data empty
New Key under HKEY_CLASSES_ROOT\whatsapp with name shell
In HKEY_CLASSES_ROOT\whatsapp\shell change default string value to open
New Key under HKEY_CLASSES_ROOT\whatsapp\shell with name Open
New Key under HKEY_CLASSES_ROOT\whatsapp\shell\Open with name command
In HKEY_CLASSES_ROOT\whatsapp\shell\Open\command change default string value to
"C:\Users\{YOUR-PC-USERNAME}\AppData\Local\WhatsApp\WhatsApp.exe" %1
Make sure to replace placeholder {YOUR-PC-USERNAME} with your username.
Example whatsapp://send/?phone=+{countryCode}{mobileNumber}&text=HELLO%20WORLD
To open whatsapp: // in windows, just add the following registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\whatsapp]
"URL Protocol"=""
[HKEY_CLASSES_ROOT\http\DefaultIcon]
#="C:\\Users\\[USERNAME]\\AppData\\Local\\WhatsApp\\WhatsApp.exe,0"
[HKEY_CLASSES_ROOT\whatsapp\shell]
#="open"
[HKEY_CLASSES_ROOT\whatsapp\shell\open]
[HKEY_CLASSES_ROOT\whatsapp\shell\open\command]
#="\"C:\\Users\\[USERNAME]\\AppData\\Local\\WhatsApp\\WhatsApp.exe\" \"%1\""
but I still have trouble starting a conversation after the last update.
I'm building a small browser using VB.Net webBrowser control,
I'm testing my apps using any web-sites, when I try to use this web-site and trying to click on any category (Fashion, Pets, Events,...), I realize that nothing happens. I can't figure it out !!!
so, it's not working.
Please can you help?
I am building an application using the reference Google Developer Sample Project. According to this tutorial i will get an authorization code from browser and will put it later in my application.But i don't want to work like this. I need to get the authorization code in direct way. Actually I want to upload file to the Google Drive account with a button click event. Every thing should be done hidden inside button click event.
If I use IE I can visit the website I want and click the 'Next' button and life is good. If I open that same website using the webBrowser control and click the 'Next button I get a javascript error message.
I'm not doing anything in the code to manipulate the website. My goal, eventually, is to have some level of automation; but at this point, I get the javascript error and a pop-up and it screws everything else.
I can hide the JS error from popping up; by setting 'WebBrowser1.ScriptErrorsSuppressed = True' but the page isn't working because of the error.
The client script might be assuming a full browser is present and trying to access part of the browser outside the Document Object Model (DOM) of the page. For example, maybe the client script is trying to display something on the browser's status bar, or trying to modify a toolbar which isn't available in the WebBrowserControl. There could be numerous similar reasons.
If you do not have write-access to the web page in question to try fixing it, then play with WebBrowser Control properties such as ScriptErrorsSuppressed and ObjectForScripting
Try setting WebBrowser1 Silent property to true.
Actually, you are receiving this problem because when you run your site in IE8 or IE9 on your normal internet explorer desktop app, you are getting either IE8 or IE( rendering, depending on which you have installed. However, with the webbrowser control, unless you take the effort to change soem settings in the registry, the default rendering engine used by the webbrowser control is IE7 (if u have 7, 8 or 9 installed) and IE4 (if you have 4, 5 or 6 installed).
This is why you are having the problem, if you want help changing the rendering engine version for your webbrowser control, do a google search as there are many examples on SO, and i have provided this answer in some of my previous posts on this tag/topic. feel free to search or ask me.
Let me know how you go.