How to get page source for mobile NATIVE (without webviews) app using selenium? - selenium

How to get page source for mobile NATIVE (without webviews) app using selenium preferably in javascript?

Depends on your chosen javascript client.
For example, with wd, you would use wd.source(); as can be found from the wd api page: https://github.com/admc/wd/blob/master/doc/api.md
For webdriver-io, the command seems to be client.source();, as found from http://webdriver.io/api/protocol/source.html
If you want to use the selenium-webdriver, it seems that the command would be driver.getPageSource(); as per http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebDriver.html#getPageSource

Related

Integrate kie-tools standalone BPMN editor to my react app

I am trying to integrate the BPMN standalone editor available in the kie-tools repository into my react application.
As an initial way, tried using the <iframe> component in order to integrate. It seemed working well.
But i am unable to customize the download activity as i am not able to get the content by using document.getElementById("bpmn-editor-container").
I have tried out in a chrome browser, disabling the security so that the cross origin issue will not come up.
The editor itself will create an iframe inside the container you provide to the open function. Here is an usage example of the DMN editor (BPMN should be very similar) in a React page. And here is a blog post with a comprehensive description of the parameters you can use to interact with the editor.

Why dynamic links in React Native are opening the browser first?

I'm trying to communicate two React Native apps using Firebase Dynamic Links, only in Android.
When I execute openLink with the URL of the other, I see the browser for a second, and then it opens the other app well.
I don't want to see an intermediate browser before open the other app.
I'm having that issue from app A to B, and viceversa.
So, why is the browser opening first? And how can I configure the apps in order to not open the browser?
it's default behavior of android devices.
usually if any link supported by app and its set default to open link then it will open directly otherwise android system opens browser and based on Link URI scheme navigate to app.
there is one solution,
You can create module (intent activity) which will launch that app directly.
Steps to follow
pass data from js to native module and from that use Intent class, set data and start it.
this was for Android use case.

How to open Electron-based application using Nightwatch framework?

I am looking to automate electron based application, using nightwatch.js
I tried to do it using Java/Selenium but did not succeeded as I was able to open application but not able to perform any action after opening.
Now I read about Nightwatch JS which uses webdriverIO which can help us automate web based applications.
As Electron app is window based application which opens web view in it so thinking of using it.
I managed to do the same and have uploaded a sample project in Github for reference at https://github.com/rik12s/ElectronApp-Automation-Nightwatch.git

Open a Safari browser from Telerik AppBuilder

Telerik AppBuilder is using it's own "webview", but Apple store cannot accepts donations through app unless it's done thought Safari browser... Is there any way to open Safari browser inside App?
Thanks
You should be able to use the InAppBrowser plugin, but use the target of "_system". See the docs for more details: https://github.com/apache/cordova-plugin-inappbrowser/blob/master/doc/index.md
Use the second argument "_system" to open the link in the default browser.
Omit it to open with in the app.
window.open("www.google.com", '_system');

Launching specific page of worklight application

How to launch a specific page of hybrid worklight application on clicking a link in email?
I did not go through all the steps involved, but yes, you can do this.
Step 1
Create a Worklight application using, for example, jQuery Mobile to handle the multiple pages
Step 2
If the app is intended for Android, you will need to modify the AndroidManifest.xml file with an intent filter in order to associate the app with an action and a custom URL scheme
You can read more about this by googling for "opening android application using a custom URL scheme", for example
If the app is intended for iOS, you will need to modify the <app-name->info.plist file with a custom URL scheme
You can probably follow this guide: http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
Step 3
Once you get the app to open from an external link, you need to handle the parameters. You'll want this since you want to open a specific page. This is also mentioned for iOS in the above link, and you'll need to further google this for Android
Step 4
Once you've obtained the parameter, you can use the Send Action to JavaScript from Native API for iOS and Andriod in Worklight in order to pass a command to JavaScript, telling the web code to do some changePage function that will load the specific page