Using Application Modeller I indentified some HTML elements on a Chrome web page (for clicking on stuff, fill input fields...)
When my bot clicks 'Attach' button, the Chrome will open the Chrome open tool (where you can browse for files). My problem is that I can't identify elements inside that open tool. I used some writers to type in the path field and file name field the path and the file name, but the bot is acting like the Chrome open tool does not exist. Do you have any idea about how can I make the bot complete those fields?
It's common that browsers (for security, among other reasons) will spawn these file browser windows as separate processes. This means that Blue Prism won't see the resulting window as a part of the same browser.
You'll need to either create a new object to attach directly to the window, or detatch and re-attach to the file chooser window once you've opened it. Attaching by the "Window Title" is usually the quickest and easiest way to target these.
Once you've attached to the file chooser window, you should be able to spy the interface elements there. If you're using the detatch and re-attach functionality within your preexisting Business Object, don't forget to detatch and re-attach to your browser instance once you've completed the required actions in the file chooser window.
Related
From the command line, or from an application, I want to open a NEW browser instance with a specified size and position, and pointed to a specific URL. I want to open a browser that acts like a dialog box. Ideally, I'd like to be able to disable "decorations" (like tabs, bookmarks, etc.). I do not want to open a new tab or pop-up window from an existing browser instance.
I know Electron or Node Webkit do this, but I just want to open a browser as that acts as a GUI front end for whatever back end I'm building.
I'd be happy if it would work for a specific browser; say, Chrome, or Chromium.
So, for instance, a Python app (or C/C++, Java, etc.) could start it's web server, then open a browser of the proper size, pointed to "localhost:xxxx/whatever.html", and serve up data via AJAX.
Kind of a universal single page app front end...
UPDATE (SOLUTION?)
The answer seems to be in two parts: 1) Opening the browser with command line switches, and 2) Resizing the window in JavaScript.
Using chromium (or Chrome), on the command line:
chromium-browser --new-window --app=http://192.168.1.80:8080/index.html
Then, within your JavaScript:
window.resizeTo(800,500)
This will bring up a new window and resize it.
This is great. Now, I can make an app in any language that allows me to open a web server. The user interface is done in HTML, CSS, and JavaScript. The browser is opened from within the application using the proper command line switches.
Electron does simply open up one or multiple browser windows, you can set them to any url via BrowserWindow.loadURL(url) this could be https://google.com https://localhost:1337 (Your backend webserver) or a local HTML file. The BrowserWindow can be created with information such as size and position.
The only alternative would be something like Qt HTML5 applications that use Qt WebEngine, but this does basically the same thing since Electron and Qt WebEngine use chromium.
Also, there is no point in a single page app that runs without JavaScript.
I'm trying to build a chrome devTools extension (an extension to the dev tools). The main intent is to create a new sidebarpanel under the "Elements" panel, where I can manipulate data from the Elements panels.
The goal is to observe the CSS changes which the user makes in the "styles" sidebarpanel, and reflect the same in the respective file on disk (I know there is a way to achieve this using source-maps concept. But I'm trying this way though).
I'm new to writing chrome extensions and trying to understand how I can achieve this. I have gone through chrome devtools extension docs, tutplus and many other sites where there are good explainations about writing chrome devtools extensions. But I'm still trying to figure out how I can monitor/observe the styles sidebarpanel in another new panel, and get the modified style info and respective file details. So that I can persist the same to respective physical file.
Thanks!
it seems you can not do it.
you can get ElementsPanel which represents the Elements panel with chrome.devtools.panels.elements, but it only have one event: onSelectionChanged, nothing with the styles sidebar pane.
https://developer.chrome.com/extensions/devtools_panels#type-ElementsPanel
This is regarding Screen Share on Chrome browser using WebRTC.
An example implementaion of Screen Share on Chrome using WebRTC is: https://talky.io
When the user choses to share a different application(say a text editor), that app's window becomes active(focused) and comes on top of browser, and this is as expected...
The Problem
But after sharing this application, when user clicks on the "Stop sharing" button(present on the floating widget provided by Chrome), the previously shared application window remains on top(focussed). Ideally on stopping screen share, the browser window should be brought back on top, as in focussed.
Is there a way to achieve this using Javascript focus method? Or is this something that Chrome should take care of.
I want my extension, once it is opened (clicked on the icon), to only be closed when the user click on my extension icon , like it happens when you have developer mode on and 'Inspect Pop-up', when it's in developer mode you can only close your extension after you click in the icon of it in the chrome.
I would like to make it visible until the user click on the extension icon (not any click outside) to close it but without having to have the developer mode on.
or if this is not possible I would like to at least once my extension is clicked, make my extension active so it can deal with the chrome.webRequest.onBeforeRequest.addListener()
Thanks in advance.
Take a look at background pages. As the documentation says a background page is
a single long-running script to manage some task or state
It should work if your aim is to achieve such a task.
Maybe, Desktop Notifications are some kind of decision.
I would like to display the latest top 3-5 entries of my extension change log (TXT file) when it's auto-updated and ideally in a balloon-type event like the one when you have successfully installed an extension. It should show/popup near the wrench-icon area. Like a replacement for #history that GM scripts have.
There are already a few SO questions about how to get extension version like here.
There are also one here to detect if it's an install or update based on version.
It is not desktop notifications I want.
My question is how to make the balloon and populate it with the lines.
An alternative is open my options.html page in a new tab and show the change log entries there somehow. Requires tabs permission in the manifest.json file.
chrome.tabs.create({url:chrome.extension.getURL('options.html')});
Any ideas how to do this?
Or is this impossible to do?
There's neither a mechanism to create a "balloon" notification (that's reserved for native Chrome code), nor to pop out the popup without user interaction. Your automatic notification methods are fairly limited: creating a new tab with a changelog is certainly possible, but not particularly user-friendly (since it will simply open at some arbitrary time, completely remote from the user's intent).
If possible, I'd suggest waiting to notify the user until she interacts in some way with the extension. Clicking on a page-action, for instance, could have some sort of infobar-like note at the top of the popup's UI inviting the user to read more about the update.