Unable to click item in android app using Appium xpaths - java

My Android app is using a clickable GridView with embedded (unclickable) images.
The user is able to select an image and go through to the rest of the app because the underlying implemention has intercepted onClick() at the gridview level which conveniently passes through the ImageView element that was selected.
However, the app crashes when I click the ImageView using Appium/WebDriver.
How can I do this in Appium?
Thanks
Rakesh

so it turns out you can click the unclickable! The reason my app was crashing was because bad xpaths are not dealt with well by Appium.
I was able to get the View object and click it.

Related

full height of webview website second page

I have a webview with the following problem: on android and desktop it works perfectly on the first page, but when I click the button to go to the second page, the height of the page does not show entirely. Only in android, the scroll and buttons are not responding, desktop is fine. It's an android project downloaded from another github user...
This is the first page working great
This is the second page issue with scroll and buttons
This is the XML layout code file:
xml code part one
xml code part two
and here are the more important lines about the webview settings located in MainActivity.java file
mainactivty.java webview settings
NOTE: Normally the website is responsive and working perfectly, whatever android, ios, etc... device, its totally responsive and works fine into a web browser in mobile device, tested physically with real device (no android emulator)
The issue is only with the second page...
remove the web view from the NestedScrollView and make it match_parent

make android torch app without main activity(open torch on first click)

I have made a torch/Flashlight app on android studio (which is working perfectly fine), what i want is to open the flash light just by clicking the app button (without opening the app). can anyone upload the source code.
Please be clear and thorough.
you can use transparent theme for the MainActivity and when activity start, turn on flash light and finish the activity! and nothing was showed to user!
you can use this link transparent theme to know how define transparent theme.
I think it isn't possible to enable flashlight by only clicking the app icon because app icon always refers to an activity.
But you can make a widget. It's well described on:
http://www.vogella.com/tutorials/AndroidWidgets/article.html

Android flash website in webview and back button force closes application

I am trying to make a little app that shows Timetable, but to make it easier I want to show flash website on fragment webview. How can I do this?
I have tried to enable plugin, but it doesn't enable flashplayer. What would be the best solution to show it in the webview or just in app?
In your Manifest file on application tag add this property
android:hardwareAccelerated="true"
If not working then try setting the below property to your webView.
mWebView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
Note: The above fix does not work in all android phones.

android google maps button on popup

Okay. What I have so far is an Android app with a Google map on which I've placed a bunch of icons that, when clicked on, create a popup with some text on it. Is there any way to place a button on that popup? If this is not possible, is there some way to make a button appear when an icon on Google Maps is selected?
In case you're wondering, the code I'm using now looks like this.
itemizedOverlay.addOverlay(new OverlayItem(point, title, text));
//actually a whole bunch of OverlayItems, each with their own location and text
//but this is the general shape of it.
mapOverlays.add(itemizedOverlay);
Edit:
There are different kinds of popups used with different versions (check yourself in the emulator versions) of the GoogleMaps app. The first popup simple displays the title of the location (Android 2.3.3).
The second popup shows the title and arrow indicator. (Android 4.0.3)
Interesting enough: I noticed that both popups are clickable and start another activity that shows details about the location.
The mapviewballon project https://github.com/jgilfelt/android-mapviewballoons/ allows you to use your own custom layout for these popup.
I did not test with buttons on it but I do not see why I would not work.
The example projects shows the following types of popup balloons.
Here is another project that creates a custom popup balloon. The project can be downloaded at the end of the article.

Switching from WebView to other views in Android

I am developing a photo sharing app for Android. I have a web site that I want the Android to get WebViews for most of it, but I want the android to have a native home screen rather than the web site homescreen.
As of right now, I open a WebView for login (this is needed because i must login with twitter) but after that I want the android to go to its own native home screen rather that the web site home screen.
I have tried using the shouldOverrideUrl() method to no avail. Is it even possible to program and android app to switch from the WebView at a given url?
Just create a method to check for the URLs to catch. Then make it not call the URL and open the home screen.

Categories