NoSuchElementException for web elements after context switch on Appium - selenium-chromedriver

This Android application is hybrid and after I switch context from "NATIVE_APP" to "WEBVIEW", when I try to find any web element, Appium throws "NoSuchElement" Exception.
Note:
In chrome browser, I can inspect the web elements but they are not working in Appium during execution.
Can someone help?
My device's chromebrowser version is 93.xx
My device's Webview version is 93.xx
My chromedriver version is 93.xx

Related

Minimum Chrome version for TWA - options?

I have a Trusted Web Activity app that is displaying a Progressive Web Application by using the Android Browser Helper. The documentation and code indicates that the mobile app only runs properly when the Chrome Browser is 72 or above. The address bar is visible when the Chrome Browser is outdated. I believe I have the option of a Webview-fallback but I prefer not to use Webview as some of the app's functionality is incompatible with Webview.
While testing, when the Chrome Browser is updated on the same device, the trusted web activity runs without any issues.
What options do I have where the address bar isn't visible?
Is the min SDK the only way to set the minimum browser requirements or can I explicitly set a min Chrome Browser version in the Play Console for the app before the user downloads it? (which prompts the user to update the browser before installation)
Thanks in advance!
It's not possible to set a browser version requirement on the Play Console.
Besides falling back to a WebView, or showing the application with the URL bar, the other solution would to block the application from loading and ask the user to update / install a browser that supports Trusted Web Activity.

Chrome inspector issue while remote debugging

I am trying to debug my android web application which I had written by Ionic framework and AngularJS and is rendered on webview browser on android platform by chrome://inspect#devices but I am seeing this screen:
here is the picture
it was working perfectly for last 5 months but now it is killing me.
I tried uninstalling chrome, reset settings, reset dev.tools but they were not practical solutions.
In addition, it is working fine while inspecting a regular website on google chrome
You should try to test it with a fresh ionic app, and you will see if it's problem of your app or chrome.
In case that it's chrome problem, try to open an emulator and inspect it, maybe it's Android problem or USB error.

How to use my PC Chrome as a mobile chrome permanently?

I use the Chrome in my laptop with Windows 7 OS, and the Chrome on Windows provides a Device Mode(shortcut is F12) so that it can simulate a specific mobile device to get and display a Web page in a Chrome tab as follow.
However, such Device Mode is only limited on a single Chrome tab, so when you close the tab and open a new one, the new tab get and show the web page as normal, not as in the Device Mode.
So my question is How to set the Device Mode permanently, and when I open a new tab in the Chrome, it runs on Device Mode by default. Is there any method or plug-in can help me to achieve it?
I believe that this is not applicable as Google created that mode for inspection purposes only not for navigating or viewing.
So you will need a smartphone simulator like the one which is provided by Android SDK or the IOS simulator which comes with XCODE on mac, or you can use a real smartphone of course, and you can inspect on it via your PC using ADOBE Edge Inspect extension on chrome.
Chrome inspector mode is designed with testing in mind, and isn't intended for regular browser use. You might try a device simulator tool, like what's included in Xcode or Eclipse IDE.
Hope this helps.
I think this is something what you are looking for
Google chrome plugin
You can open devtool automatically with chrome switches, so i suppose that you can reach your goal with the correct one... our only problem is that chrome's switches are thousands... that's the documentation, good reading :D (unofficial documentation here)

Google Chrome push-notifications without browser running

Does anybody know how to implement receiving of push notifications outside and without running browser?
There is some nuance to this:
Chrome for Android: Push messages will wake up the Service Worker and Web App even if the browser is closed. This is the default and our ideal position across all platforms
Desktop Chrome: Push works and will wake up the service worker if the browser is still open. However it will not work if the browser is closed. You can force the browser to remain open if you have a Chrome App that is set to run in the background. Other than that we (the Chrome team) are working out how we enable this by default on Windows, Mac and Linux.
Chrome for iOS: Push just does not work on this platform
Chromium blog has a post with code examples: http://updates.html5rocks.com/2015/03/push-notificatons-on-the-open-web
And the documentation was updated too: https://developer.chrome.com/apps/cloudMessaging
It is possible to write Chrome extension where background script can run if Chrome is allowed to run in the background (configurable in settings) and it can use GCM.

Why CEF app is not rendering Polymer UI?

I have developed a web application using Polymer and packaging it as a CEF App. When I launch the application, I only get a blank screen while same application in browser is rendered properly.
I'm using CefSharp (V- 1.19.0.41824) to embed a webView control in my winform application. Below is the code that I'm using for displaying web content in webView -
webView = new WebView();
webView.Load("http://localhost:8000/sampleApp/")
Any pointer will be very useful.
If the current core chrome version used by CEF is lower than 36, then you'll need to enable the experimental flags to allow the web components features.
I don't know how you would enable those flags in your project, but I do know that web components and html link/includes where only made mainstream in the browser core from chrome 36 onwards.