coded ui : mouse hover fails on different machine - coded-ui-tests

I have recorded a test, in which mouse hover over a link.
on the same machine(say m/c A), where i recorded the test, mouse hovers over the link correctly.
But when running the same test on different machine(say m/c B), mouse hovers fails.
Since link doesn't have ID associated with it. It takes the co-ordinates and inner text as search property.
Tried recording mouse hover in m/c B, mouse correctly hovers over the link.
How to make sure that same test will run in different m/cs?
Thanks,
Kiran

Try This
When you record It records coordinates of the link in designer file
(Eg:Mouse.Hover(linkObj,(12,8))), After moving the recorded method to .cs file remove the coordinates and run the test.

Related

Make mouse move via a virtual mouse device (none Xorg)

My goal is to remap a physical device (Aimtrak Lightgun) which acts like a mouse, towards different button input (the X,Y are fine).
Currently the trigger registers as a right mouse click, but I want this to become a left mouse click.
I did follow the evdev tutorial, adjusting the "create uinput" and "injecting" parts.
There is no error, but the mouse is not moving or the button is not clicked.
So it would be fine to grab the device and control all the input.
But I am unable to make it work.
Any other approach is also welcome.

Xcode 10 - how to pin UI element library window?

I'm laying out UI on a storyboard using the new, controversial library button which has been moved up.
This is driving me crazy - I want to be able to "PIN" this window to a secondary monitor so I can always see available components as opposing to having to click that button every single time I need an element. Currently it disappears, even on secondary monitor once I shift focus to the view controller on screen.
How do I pin the UI Elements library to be able to always see it ?
You can press the option button in keyboard and click in the library window, it's will hold
Picture of library windown

How do I find the control to test against with CodedUI in VS 2015?

I'm using VS 2015 Enterprise. I'm new to CodedUI testing. I've added a CodedUI test project to my solution. I've created a simple test, clicked on a button, selected a radio button, etc.
I've been following a Pluralsight course titled "Test Automation with CodedUI". I want to find a control on the WPF form, but once I select the control finder in the test builder and move the mouse off to the running application, it is no longer a bulls eye. I don't understand why its different than what's shown in the Pluralsight course. I think the instructor used VS 2012. Could that be the reason?
There are subtle changes between versions. After clicking the assertion builder button in the Coded UI recorder then, as you move the mouse pointer around the screen (do not move it too fast or you will confuse yourself), you should see a blue rectangle drawn around parts of the screen. As you move the mouse pointer carefully you should be able to select larger or smaller sections, corresponding to higher or lower items within the hierarchy of controls on the screen. Click on a control of interest. You should then see a window showing the properties of the selected control. There are four arrows (up, down, left and right) in the new window. Click on these to navigate around the control hierarchy. Note that and 'up' followed by a 'down' will seldom return to the same control. The 'up' moves the parent control and the 'down' moves to the first child.
My suggestion here would be to use the keyboard shortcut to enable the control finder. When you hover over it with your mouse you should see it - if I recall correctly it's "Alt + H". Basically you'll move your mouse to the control you want to identify, then do the keyboard shortcut, then click. It should identify the control correctly at that point.

Move command in Dialog based aplications

I working on Dialog based applications once i right click on the Dialog Title bar a drop down list is coming with two options 1. Move and 2. Alt+F4 close. Once the User Press Move and he can able to drag the window as he desired and I add the On NC Hits Test to stop dragging its stopping normal dragging but it is not working in this particular context can any body help me in fixing this Bug.
When the user use the keyboard interface, he can move a windows with the arrow keys, without using the mouse.
If you want to limit the position of your dialog, process the WM_MOVING message.

Move from one view to another on button click----?

I am new commer to IPhone and developed an app "display next and previous image on button click in single view based application".i want, on run my app"one start button and welcome message view" and then clicking on start button, want to move on my already developed application what i have made with Next and Back Button which are showing the next and previous images properly. Also i want, on button click (start), automatically images moves next without
clicking on Next images after some interval of time(5 sec) so that user may use the manually to move from one image to another or automatically after some interval of time.
Thanks in advance to all of you.
I don't undertand what your are saying with "on my already developed app". I you want to move between views avoid Sin
I recommend you to check UIScrollView reference guide and check the Sample Code that Apple provides.
UIScrollView Class Reference
To move between imagen using non gesture detections you can also perform some animations using
UIView animations on the IBAction of the buttons.
I'm sure that if take a look around at apples samples and guides you will develop the app so fast.

Resources