Appium and android stock browser - android-webview

I have Samsung device with stock browser that called Internet.
The device is over 4.4 version.
I'm trying to remote debug the stock browser on a real device without success.
Already succeeded to remote debug chrome.
Is it possible on a real device and not on emulator?

The problem is just Samsung's stock browser
Hi!, Appium started to work with Android's stock browser (named.. Browser) since v1.3, the actual problem is the Samsung stock browser isn't Browser, it's Internet! These both apps are different (shame on Samsung!, not Appium guys fault). All other Android distributions that stock browser is Browser are working fine with Appium >= v1.3 as I've said before.
Emulator stock browser is Browser, that's why it's working for you on Emulator!
Why Appium doesn't work with Samsung's stock browser?
Appium are built to work with Chromium WebView (present on Chrome and Browser) , and Internet does not have it. So it doesn't work with Appium now, and probably won't work never, as Appium's maintainers does not have any interest to do the automation outside Chromium WebView. See this issue for more information: https://github.com/appium/appium/issues/4509
Ok, but how do I use Appium with Samsung devices?
So, the only solution is installing Chrome into your samsung device.
If you can't access the store to install the Chrome app, you can download and install manually the Chrome APK into your device (or other browser that uses Chromium webview, such as Chromium and ContentShell).
PS: ContentShell is basically only Chromium webview, without favorites, bookmarks and other common browser stuff, so it's pretty good for Appium testing.

Related

How can I debug a Flutter Web App on Safari using the inspector?

I am using flutter to write a simple app, everything works fine on Android, iOS, and Chrome. (I've also tested on Firefox & Brave Browser, all's well).
However, on Safari (Mac & iOS), the flutter app gets stuck on the index.html file and does not load the PWA.
The error from the console on Safari Inspect
How can I know what the anonymous function in js_helper is, or what main.dart.js:57063 refers to?
Is there any way of building for web without minifying?
Has anybody encountered a scenario where everything works on all platforms except Safari?
Flutter Doctor
Log from console when running on local server
debug for safari is not supported yet
but for anyone with the same problem you could solve it by running the app on release mode
flutter run -d chrome --release
after that open with the same port on safari and everything should be fine
You won't be able to debug it directly on Safari, but if you just want to test your app in safari with localHost, you can use these steps :
Enable 'developer' menu in Safari from settings of Safari :
Then check on 'Disable Cross-Origin restrictions"
Now after running release version of web app in chrome, use same app's address in Safari, you will be able to test it. Ex. http://localhost:51155/
to run in release mode : flutter run -d chrome --release
Hope this helps!

Debugging a website on iPhone Safari

I have a website that loads perfectly on various browsers on Windows Laptop, Android and Fire OS. The same site refuses to load on a Safari on an iPhone.
It is an angular application. While I see the index.html load, the angular does not load. I need to debug to figure out what is happening. I only have a Windows 10 laptop. How can I debug the website running on Safari on an iPhone from my Windows 10 laptop?
If you only have a windows laptop, you will need an online service like browserstack. There is no way around this. Physical Iphones can only be debugged with Safari, running on physical Mac desktops or laptops. Browserstack is a subscription service, but it will be a lot cheaper than buying the hardware. (No affiliation)
Follow below link
Building and debugging websites and web applications for mobile devices can be a hassle. On the desktop we have powerful debugging tools; most browsers have a web inspector of some kind. But we don’t have those tools for devices like the iPhone and iPad … that is, until now!
https://webdesign.tutsplus.com/articles/quick-tip-using-web-inspector-to-debug-mobile-safari--webdesign-8787

Troubleshoot Android 4.3 webview within an app that requires up-to-date Google Play services

I need to troubleshoot an issue happening in a webview running within my app. This issue only occurs on Android versions lower or equal to 4.3. My app requires an up to date version of Google Play services.
In order to troubleshoot my webview, I usually can run my app under the Android Emulator (with the latest version of Android), then connect to the web view via Chrome (using chrome://inspect) - the web view appears in Chrome and I'm able to browse the DOM and debug.
To run the app under 4.3, I've created (under AVD) a new device from an existing device definition,
then picked the target Google APIs (Google Inc.) - API Level 18. I've then installed my app, but when trying to run it, I get the error message "This app won't run unless you update Google Play services.". There's an "Update" button on the previous dialog, but nothing happen when clicking on it.
I then tried to debug my issue using Genymotion. I've created a device under 4.3, followed these instructions to flash my device with the latest Google Play services and installed my app. I can now run the app and reproduce the issue within this simulated environment.
The trick now is to be able to connect to the web view from my local Chrome browser. I've enabled remote debugging as described here. Now my device appears in Chrome, but the web view is not showing up in the inspector. Similarly, if I open a new tab under the native browser, it won't show up in the remote inspector. If I open a new tab under Android Chrome though, I can see it showing up under my remote Chrome inspector.
I can see two way moving forward and successfully accessing to the DOM of my webview:
Fixing the "Update" issue under the Android Emulator running 4.3
Or
Connecting to my web view from my Chrome inspector while running the app under Genymotion
Any idea on how to solve one of these two problems?
I have been using weinre for sometimes. it's a pretty good tool to debug webview for android 4.3 and lower. It provides almost same interface as chrome debugger.
All you need to do are:
Install weinre
sudo npm -g install weinre
Client side:
Insert the following code to your webpage <head> section.
Note: it's better to put it at end of <head> section, otherwise there will be some strange errors and debugger won't show up.
<script src="http://<your server ip here>:8081/target/target-script-min.js"></script>
Server side
weinre --boundHost -all- --httpPort 8081
Debugger
open the debugger tool from weinre from your desktop browser:
http://localhost:8081/client/
Finally,
select any target in Targets part and then start debugging.
Remote debugging web views only works on devices with android 4.4 and above.
have a look at this :
https://developer.chrome.com/devtools/docs/remote-debugging

Browser For Google Tv Emulator

I have installed Linux OS with KVM and Android SDK. After that, I installed Google TV Add-on to it.
Next, I created AVD Google TV Addon (Google, Inc.) - API Level 12 with a screen resolution of 720p.
After running the emulator, the emulator works fine, but the emulator does not contain any browser. How to install the browser(google chrome)? I would like to run my web application in a Google TV emulator.
Browser is not supported in emulator. Please refer to this post for a workaround:
Google TV emulator without chrome browser?
Also, please file a feature request :
http://code.google.com/p/googletv-issues/

Testing GWT application on Mobile Emulator

I want an android and iphone emulator to run on windows to test my gwt application on windows. can someone point me to a proper emulator because i've been trying some with no success
The official iPhone simulator does not run on Windows. Seems you have to get a Mac ;-)
However the Android emulator can be installed pretty much anywhere:
http://developer.android.com/guide/developing/tools/emulator.html
If you point the Andorid browser in the emulator to your GWT application you should be able to test it. You can find messages from the browser in LogCat, watch out for the logging tag WebCore. You can even log from within your code and get the output in LogCat, see:
http://developer.android.com/guide/webapps/debugging.html