How to scroll android screen by AndroidViewClient - python-3.x

Currently, I'm working on Snapchat and I want to scroll the screen slightly
1.device.vc.dump()
2.device.vc.findViewByIdOrRaise("com.snapchat.android:id/neon_header_avatar_container").touch()
3.device.vc.dump()
Now I want to scroll the screen to findViewWithText My friends. so how I can do it,

You can use culebra and generate the python code needed for scrolling or dragging.
Run
culebra -Gu --scale=0.25
then right-click and open the command dialog, select Drag dialog and grab the points clicking on the device image (using Settings here as an example)
something like the following code will be generated
device.dragDip((184.73, 699.64), (176.0, 443.64), 1000, 20, 0)
vc.sleep(1)
vc.dump(window=-1)
When executed you will see the device scrolling.

Related

How to center a tauri app on the osx tray icon

I am trying to center a Tauri app on the osx tray icon, but cannot find a way to do it.
The idea is to make the app open and close on tray icon click, and to make it fixed at the top of the screen and centered on the icon (the y position may change depending on the number of items available from other apps). Something like this:
https://eshop.macsales.com/blog/wp-content/uploads/2019/05/Fantastical1280.jpg
(Sorry, i tried to add the image to the question, but always got a "Server error" when uploading)
I have searched the docs, but haven't found anything and also didn't find a solution on google
On the tauri.conf.json there is a windows.x and windows.y options, but i don't think i can get this kind of logic there.
I noticed that there is a window.set_position() function that i could call when the icon is clicked. But i am not sure how to get the correct position to enter the window on the icon

Android studio Scroll View auto scroll Issue

I have been working on a app that allows user to fill details on a form but while making the form in design view one problem has slowed me down so much.
i am using a scroll view so every new item gets added at the bottom so its always off screen.
i scrolls down to see how it looks but after i do anything the scroll view auto scrolls to the top so i have to scroll down again and again.
is there a way to stop auto scrolling to top when code get updated in the editor.

Coded UI Test Builder not recognizing buttons on the pop-up window

When I click the crosshairs icon on the Coded UI Test Builder and drag it over to the pop-up window buttons (Run and Cancel), it is unable to locate and find the Properties of them on the pop-up window.
Does any one know how I can know the properties of the Run button on the pop-up window?
That window appears to be a Java window, which is not supported by Coded UI.
You may be able to extend your tests to interact with the Window:
https://blogs.msdn.microsoft.com/gautamg/2010/01/05/1-introduction-to-coded-ui-test-extensibility/
Alternatively, if you can detect if the window is present, you may be able to emulate the keypresses required to dismiss/approve the window (e.g Enter, or Tab + Enter). Or, if the window's location is predictable, emulate a click at the desired location.

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.

where is layout of source

if i want get root view,i also by call getWindow().getDecorView().findViewById(android.R.id.content) or findViewById(android.R.id.content).getRootView().so i want to know if i can find the layout of android.R.id.content. could you tell me where is the layout.you can give me a link or other.thanks
You can use Hierarchy Viewer tool, See the definitons and Steps of how to use this tool in developer guide as shown below,
It shows visual representation of the layout's View hierarchy (the Layout View) and a magnified inspector of the display (the Pixel Perfect View).
To get the Hierarchy Viewer started:
Connect your device or launch an
emulator. From a terminal, launch
hierarchyviewer from your SDK /tools
directory. In the window that opens,
you'll see a list of Devices. When a
device is selected, a list of
currently active Windows is displayed
on the right. The is
the window currently in the
foreground, and also the default
window loaded if you do not select
another. Select the window that you'd
like to inspect and click Load View
Hierarchy. The Layout View will be
loaded. You can then load the Pixel
Perfect View by clicking the second
icon at the bottom-left of the window.
If you've navigated to a different
window on the device, press Refresh
Windows to refresh the list of
available windows on the right.
Now with the help of this tool, it shows the content is in Frame Layout, pls refer this output given by this tool.

Resources