How to programmatically click google maps icons - ruby

Take a look at this map:
This map pops up when you visit https://www.hertzcarsales.com/, and click "Change" next to with "Within X miles of Y" dropdown selector. Anyway, I cannot right click on the little H's to inspect with FireBug, and I can't seem to figure out how to access the urls attached to each using watir-webdriver.
When I click on an H I can do
b.as(:text,/Visit this Store/).href
but I can't get them all though.

From what I can tell, I don't think you can. If you peel the map down to where the pins are, they are contained in a CANVAS tag which Selenium cannot see inside.
I did find another way to get what you want. Go here instead, https://www.hertzcarsales.com/locations. Click on the blue "Find a Car Sales Location" button in the middle of the page. That will launch basically the same dialog except there are location summaries on the left side of the page. You can click the View All link in the top left. Now you have every location's info and you can grab the links you wanted.

Related

How to disable the Tv remote only right navigation focus using js-spatial-navigation on Webos?

"I am trying to implement https://github.com/luke-chang/js-spatial-navigation on the webos multiple lists if one list is finsihed after i click on the TV remote right navigation the foucs is going to next list but i want to stop the right focus on once user reaches the last item of the list but it should work on left and top and bottom focus"
I can't understand your problem either. From my experience the horizontal row is limited by the TV screen width and once you hit the last item in the row the right arrow keys doesn't work, but I'm not familiar with webos. I've had good success adding fading context text that appear when a item is focused and a changing hero graphic too. Check out http://loopzine.tv/firetv.htm
D-pad or keyboard with arrow keys required.

show NSUserNotification additionalActions on click

In the image above you can see two notifications on OS X. The first one is from my app and the second is from Apple's Reminders.app. In the image you can see the otherButtonTitle 'Complete' and the actionButtonTitle 'Later'.
The second notification, i.e. the one from Reminders.app behaves quite differently. It gets this little arrow pointing downwards on mouse over indicating that there are more actions when clicked. And indeed, you just need to click once on 'Later' and it will give you a couple more options to choose from.
However, I can't get the same behavior to work for my notification. I don't get the little arrow on mouse over and I don't get more options displayed from a single click on 'Later' (notification just gets dismissed). More options only get displayed when holding down the mouse button on 'Later' which is not obvious.
Am I missing something obvious here? How can I get my notification to have exactly the same as the ones from the Reminders.app?
While trying to find a solution for the same problem I found this nice explanation for the NSUserNotificationPrivate class that explains how the Reminders app does it.
https://github.com/indragiek/NSUserNotificationPrivate
If the notification type is set to "Alert", the alternateActionButtonTitles property lets you set an array of additional menu item titles to be shown in an action menu that can be accessed by hovering on the Action button and clicking on the arrow.
Once a notification is handled, the index of the action can be retrieved using the _alternateActionIndex property.
So they are using a private API. As the site's disclaimer say using any of this will result in your app being rejected from the MAS and potentially breaking if the APIs change.

Firefox Dev Tools highlight DOM nodes when clicking an element

To be clear, this is not highlighting in the sense of finding an element from the DOM Inspector to the page, or vice versa. It's behavior I haven't seen before, but then I usually use Chrome.
I'm debugging a textarea that won't accept clicks, or allow selection, or basically gain focus in any way. I noticed that clicking on the textarea, in the page, caused several DOM nodes in the Inspector to highlight, and then fade away after a second. None of the nodes that highlighted were the textarea; they were parents of the textarea, including the body, but not necessarily all of the parents in between the textarea and the body. There was also a sibling of one of the parents highlighted, as well.
It's one of those things where Firefox is trying to tell me something, but I don't know what. I feel like the answer to my original problem is probably contained in this highlight, if only I knew what it meant.
In the attached screenshot, you can see the textarea highlighted in blue, being the selected element, and the rather grossly-colored highlights on a few other elements; this was right after I clicked on the textarea (in the page, like I was trying to enter some text in it; not in the inspector)
What does it mean?
When the nodes in the markup view (the thing in your screenshot) highlights, it means that these nodes have gone through mutations. These can be of the following manner:
Attribute value change on the node
Addition/Removal of child nodes
Now, what you are actually looking a way to hover the textbox and get the markup view to select your textbox, right ?
You can do that in two ways:
Hit the shortcut Ctrl + Shift + C. You will see an overlay on the page which follows your mouse. Head over to text box and click it.
Click the "Pick an element from the page" button on top left corner of the developer tools and the same node-selector will appear.
For more and deep information : visit the MDN page : https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector

is there a trick to working with multiple visual studio panel objects at design time

Is there some sort of shortcut key that I am missing here for swapping panels around in the form editor of vs2010?
I have numerous panels which are swapped at runtime according to an enum "toggle" value and the only way I seem to be able to move them back and forth is to make one panel smaller than another and right click it. Half the time I end up selecting some other object in the action of trying to right my panels.
I figured there must be something i'm missing here.
there are icons on the layout toolbar for this task. I pick the panel in properties and move it around with those. Way easier than right clicking and hoping for the best.
edit: although sometimes the buttons are not enabled when you need them to be. Still right clicking a resize handle adorner dot will pop up the context menu where you can then choose to move back/forward.
I still wish there was some key combo I could press. Hitting the 4px of display area that the adorner dot occupies on my screen is sort of a dexterity test of sorts and slows me down.

when using yahoo maps the "X" (close button) in the smart window is showing up on the upper left

i am using code right out of the examples in yahoo maps api, but when i click on a smart window i get the close button (x) in the upper left. the only thing i am changing is the html in the smart window but i dont understand why that would affect the location of the close button. also, i dont see any documentation on how to change this on the yahoo maps api web site.
You may want to look in your page CSS for anything that floats img tags left or positions them absolutely (think along those lines).
One debugging method would be to temporarily turn off your page's CSS to see the result.

Resources