Chrome extension navigate and scrape several different sites - javascript

I want that my chrome extension would navigate to Gmail login page, run a content script that logs in and then to navigate to another site (let's say drive.google.com) and then run another content script.
I want the user to monitor the process and that's why Selenium and PhantomJS are not suitable.
How can I identify that the login was successful?, I tried using MutationObserver but it doesn't work after redirects.
thanks

Related

Is it possible to open tabs in existing window?

Let's say there is a page behind a login system that I would like to run puppeteer for web automation and for simplicity, I don't want to launch a new browser and enter the login system with puppeteer. Instead, I want puppeteer to activate the tab where I've manually logged in to the system.
I found something like page.bringToFront() but it works for pages, not windows/browser.
This leads me to the question: Is it possible to open tabs in existing window with puppeteer?

How to create login page on chrome extension?

I have been working on a chrome extension for several weeks now, however, I am wondering how to go about creating a login page that gains access to the actual extension.
So I have a chrome extension and I have also made a wix website for the extension, where someone can sign up and create an account. The user will use that account info to sign into the chrome extension login page?
Questions:
1: How to create a login page that determines who can access the chrome extensions contents?
2: How to link the chrome extension to my websites member info?

What's the correct way to open an app from a Landing Page?

I have an app developed in Ionic V4 which uses the deep link plugin, and a landing page developed with HTML and Javascript.
the landing page uses location.href = "com.orgName.appName://" to open the app.
The flow is:
a customer receives a link via SMS and when he clicks it he is redirected to a Landing page.
The landing page checks the operation system (Android or IOS) and then checks if the app is installed on the phone. If it is, it opens it and if not it takes the customer to the App Store/Google Play.
This used to work up until not long ago. now, it says "Redirect Blocked".
I read some articles and found out Chrome blocks the redirect on page load, so you need to create a button for the user to click, and then it works.
Our customer insists that the app/store will open without the user interaction.
I found an app which does that successfully, but I can't inspect to see how they did it because the logic is done on their server.
I've tried:
using location.href on page load or on load events
wrap the redirection in a SetTimeout
use window.open which works for the most part, but not on all devices + requires the user to allow popping windows.
using document.getElementById on a button, and invoking the click() function

How can I manage websites settings in electron

I'm creating a browser using Electron. And it opens websites using webview.
<webview id="View" useragent="..." src="https://example.com/" plugins="" preload="file/dir/webview.js" webpreferences="..." enableremotemodule="false" allowpopups=""></webview>
Now I've got a question, how can I detect when a website is trying to request access to something using JS/Node?
The explanation of my question:
Every website in chrome has its own settings, and they can be access by clicking Site settings in the page info window (look up in the picture) or by going to chrome://settings/content/siteDetails.
And the website settings include whether it can or can't access the user location, use the microphone, use JavaScript, Senf Notifications, etc.
How can I control those settings of websites in electron?
And how can I detect when a website is trying to gain access to one of those permissions? (just like how Wexond does, Wexond is a browser that is built using Electron)

Refreshing same browser window from windows run command

I have one web application. When client enters the address and after successfully logging in. He gets the home page with some data over the page. Now when any third party tool or from run command if i give the same url on which the client is with changed parameter values, i want the same browser window to be refreshed with updated/changed values without opening the new browser window.
Whats happening now is that when i'm triggering the url from different source, its opening in new browser window. Plz help me out with few suggestions.
Ars.
The best solution would be for the web application to poll the server and refresh itself when there is an update.
Your command line tool can then contact the server and update the parameters directly, and the application in the user's browser will pick up those changes automatically.
Attaching to a running Internet Explorer instance is also possible, for example see this article: http://www.codeproject.com/Articles/9683/Automating-Internet-Explorer, or the Selenium project at http://seleniumhq.org/. But you're almost certainly going to make it easier for yourself by changing your application to refresh automatically.

Categories

Resources