How can i automate Google map image on web page? - selenium-webdriver

I am not able to automate google map screen which is present on my application web page.
I have web page where google map is present in square in half of screen. I want to click on the road present in map or a restaurant logo which is present on the google map.
When i tried to find the locators for the map then in the DOM it is present as an image and no other html properties or locators are associated with it.
Also i tried an option using moveToElement() function of action class but this solution is not reliable as most of the time it is not working.
Please suggest me any solution for this automation issue if someone faced this issue of Google maps automation before ?

Sounds like HTML5 issue over a google maps issue. This is tricky for Selenium, see these articles:
https://www.linkedin.com/pulse/html-canvas-testing-selenium-opencv-maciej-kusz/
https://chariotsolutions.com/blog/post/automated-testing-of-html5-canvas/
which recommend using action chains to move to and click certain x,y coordinates.
Also, check out the canvas javascript api; you may be able to use javascript_executor to manipulate the canvas.

Related

Google Maps Free API for NGO project

I'm building a React app and I would like to use Maps. Google Maps and other Maps APIs have a charge and this project will be free for the community (just like an NGO) so no budget at all.
In this app there is a page to create an Event, so you can type many things and where the Event will happen, and that is where I would like to use Maps, to search and show the location.
I thought that if is there any possibility to use a search box connected to an API just to get the Longitude and Latitude based on the search would be great, but I have no idea how to make it and I was expecting that you could help me find a way. (the thing is: get the information for free)
Just as I create this event, I would like to show this information on the Event page, so where the event will happen. And that would be the second part that I would like to use Maps. Do you know if I just show the location in Maps if I would be charged? If so, then I can use redirection to Google Maps using the Latitude and Longitude that I got from the event creation.
Thanks in advance!
See https://www.google.com/nonprofits/offerings/google-earth-and-maps/ for non-profit organizations.

Appium is unable to identify any element on particular page of My Mobile native app

appium logs 2nd part
appium logs first part
UI Automator showing element properties
UI Automator showing all element properties
Summary:
Appium is unable to identify any element on particular page of My Mobile native app. I have used all the possible locators for different elements shown on that page with help of UI Automate Viewer.
Used different locators (by id/xpath/contains/accessibility/UIAutomate).
Verified that the page belongs to native app only with no Web View.
applied different types of sufficient wait for the page.
driver.get.pagesource not working for the page.
Can any one please help in same, the below ways I have opted for finding the solutions but nothing has worked till now.
You say a native apps, but seen from the picture, that you facing with like a Maps application (this is web apps, my assumse), often in testing things like this happen, like you have to do a switch context. When you are on this page please try this :
driver.context("WEBVIEW_1");
And this is for switch again to native :
driver.context("NATIVE_APP");
Please read this reference and this.

Android map navigation

Hi I am new to programming so please bear with me.
Basically, I want to create a map for Android devices that load markers and navigate from point A to B while avoiding the markers. It is ok if the path is not the shortest.
I have tried loading markers from geojson file using both google map and mapbox with no problems. Now, what can I do to customize navigation within the app itself? Thanks in advance.
Unfortunately, it does not appear that this feature has direct support from the API. Please see these answers for alternate suggestions:
Google API (directions) - creating routes that avoid certain points
Blacklisting specific roads from Google Maps/Mapquest?

Can we add multiple marker using geo uri scheme

I want to add multiple marker on a button click event !!i am using phonegap with angularjs. What exactly should happen is when i click the button google maps application should open up and multiple markes should be displayed deppending on number of location... I have been succeeded in adding single marker using geo uri..
<a class="button-green button-green--large" ng-href="geo:{{selectedClass.latitude}},{{selectedClass.longitude}}?q={{selectedClass.latitude}},{{selectedClass.longitude}}">Locate</a>
p.s. I have searched stackoverflow previous questions and found that i will be able to complete the above task by adding static map , but i wish to open the google map on button click event, which i wont be able to using aforesaid method.
I do not think you can set multiple markers on google maps anymore. Instead, you can make an activity, or a web service to handle it, just like this one:
IMG: https://maps.googleapis.com/maps/api/staticmap?size=235x227&maptype=roadmap&markers=37.970982,23.724559|37.971487,23.724953|37.973291,23.726862
URL: http://kylelam.github.io/SO/customMarkers.html?size=235x227&maptype=roadmap&markers=37.970982,23.724559|37.971487,23.724953|37.973291,23.726862

Integrating kibana dashboards into an angularjs app

I have my ElasticSearch setup with kibana showing different panels. I have another angularjs app. I would like to receive input in a field, use angularjs and show kibana panels in my angularjs app itself.
Are there any tutorials/guides to achieve this?
I have googled quite a bit about this, but am unable to find any help.
You could also rephrase my question as "How do I embed a kibana dashboard in my AngularJS Single page website?"
In kibana4, the easiest way to embed a dashboard is using an iframe. Click the "Share" button in the top-right corner to get the appropriate iframe tag. Then edit it as needed to make it embed seamlessly. Check out the seamless attribute.
When I google it your question, I have found some git article
May be it will help you to
You can use iframe read this
https://github.com/elastic/kibana/issues/729

Resources