Why does my automated Blue Prism process fail in some stages in scheduler-mode, when these steps work totally fine in debug-mode? - process

For example I implemented a stage "Activate Application" that works in debug mode perfectly, but fails when I use schedule-mode or when I simply drag and drop the process on a runtime resource.
A second example that fails: I implemented an action called "Navigate to URL". These action sets the URL from the input variable In_URL firstly in the URL bar in browser Google Chrome. Then the URL bar is focused and the enter button is hit in the last stage.
In schedule mode the following error appeared:
ERROR: Internal : Failed to perform step 1 in Navigate Stage 'Click URL Field' on page 'Navigate to URL' - Could not identify process owning the current foreground window
Actually there is only one Google Chrome window, so I don't understand why it says these error message.

These issues are typically due to either Windows being locked, or using RDP to connect to the resources (RDP does not work well with Blue Prism). In both cases, the desktop will not be active, so any active accessibility or region elements will fail.

Related

chrome:headless mode the side bar not visible

Sidebar element is not visble in headless mode.
My test running fine but when I used chrome:headless mode then the test always fails. Even I use wait option to wait for element but always fails.
I used screenshot option and I found that the whole left side bar is not visible.
I tried with different browser and got same result. This issue is only in browser:headless.
try using maximizewindow before running your tests. If the problem still persists, please send us an example project.

Robot Framework Selenium Go To Keyword blocked by browser popup

I am trying to use the Go To Keyword to navigate to a page.
When you navigate to this page there is a browser popup that you need to use to log in.
The problem I am encountering is that this popup blocks Robot Framework from recognizing that the Go To Keyword has been completed. I have steps in my testcase to try to log in using this popup, but they never get executed because it just gets stuck on the Go To Keyword.
One workaround I tried is to put the Go To Keyword in a separate user created keyword with a timeout of 2 seconds, and then run that keyword in the testcase prefaced with the Run Keyword and continue on failure Keyword. But for some reason the popup blocks even this timeout from triggering and it's still stuck until I manually close the popup.
Does anyone know a solution to this?
What this turned out to be was an issue with single-sign-on.
I had logged into the website environment with a fun account, when opening this page information was being retrieved from a different domain.
Usually when you are logged in with your company account this information is used to acces the second domain.
But because my fun account does not exist in that domain this failed and the popup appeared. Because the popup is a Windows element and not a Chrome element Selenium could not handle it.
We talked about a possible solution and the best method seems to be to use the AutoItLibrary and use the RunAs Keyword to start Chrome as a user with the credentials for the second domain.
I did not fully flesh out this method because is has incompatibility issues with the way we want to execute our automatic test suite. But I wanted to put it here for reference for anyone else encountering this problem.

Apple's latest (2015) 'link to app store' directive causes unwanted Safari behaviour

I want to add a link from my app to another of my apps on the appstore.
Question How to link to apps on the app store showed that the itunes.apple.com link was,until recently, the normal way to go. I've tried this and everything is fine. The problem begins when I disgard this and use Apple's new recommendation of using appstore.com. I use the following line of code:
[UIApplication sharedApplication] openURL:[NSURL URLWithString:#http://appstore.com/myappname"]];
The first time I call this from my app it works well. You see it jump through Safari and move onto the appstore where it displays my app.
At this point if you look back into Safari you will notice a new blank tab labelled Favourites has been created.
If I go back to my app and perform the same action to link to the appstore again I'm prompted with one of the two popup boxes:
"Open this page in "App Store"? [Cancel] or [Open].
or
"Cannot Open Page. Safari cannot open the page because the address is invalid" [OK]
I've found that manually deleting the blank tab in Safari will allow the link to work properly but this behaviour isn't what I want my users to see- and I wouldn't be expecting them to delete the blank tabs from Safari.
Any advice on stopping this behaviour whilst following Apple's new rules greatly appreciated.
A simple and clean solution is to present an instance of SKStoreProductViewController inside your app (modally) to display information on the products you are interested in. The user can interact with it as a small view on the App Store and you can simply dismiss it when done.

Provide an OSX Service Without Launching the App?

I have successfully implemented a "faceless service" (background-only app with .service extension) and get it to work (see this question), based on Apple's documentation and other tutorials on the web.
Now, I want to advertise a service from an existing, single-window GUI app that I have.
I have setup the Info.plist file of my app to advertise the service, and it gets installed when I build the app.
But when I invoke the service from the context menu in (say) TextEdit.app (my service colours the selected text based on a certain criterion), my app gets launched, main window and everything. To make things worse, I am right-clicking on a TextEdit window that is in a secondary monitor, so my app's main window appears for an instant in the secondary monitor, then quickly repositions into the main monitor (this might have something to do with my window-centering logic, but nevermind...).
I would like to provide the service (i.e., have the class that provides the service in my app
instantiated and execute its method in response to the request), without my app appearing on the Dock or showing its window and main menu.
Is this possible? Safari advertises "Search With Google", so it should be possible...
EDIT: Now that I think about it, "Search With Google" must launch Safari every time in order to work, so this remark does not apply.
Perhaps I can put some logic in -applicationWillFinishLaunching/-applicationDidFinishLaunching to determine if the app is being launched in response to a service, and skip creating the window(notice the lack of withOptions: in OSX)?
But still, that doesn't feel right.
It does have a lame version of withOptions: -- NSApplicationLaunchIsDefaultLaunchKey tells you if your application was launched to either:
open or print a file, to perform a Service action, if the app had saved state that will be restored, or if the app launch was in some other sense not a default launch
So in your applicationDidFinishLaunching you can see if that key is in the notification and set to NO. Unfortunately, the main way to tell that it is one of the possibilities other than the Service, you have to detect and record whether or not you also got an application:openFile:, etc.

get url event on app open in objective c (Mac OSX)

I'm writing a very lightweight app for OSX 10.6+ which will respond to a user clicking on a URL, pass that URL to another application via TCP and then exit.
So far it has registered fine to launch when a user clicks the custom url scheme. However the event seems to get lost if the app is not already running. So the users clicks the link, the app loads, but nothing happens. Once the app is running, if the user clicks the link then it grabs the event and processes it as normal.
What do I need to do to catch that initial event that causes the app to open in the first place?
Currently I'm creating the NSAppleEventManager in the applicationDidFinishLaunching method, and this works for all events created AFTER the initial load, just not for the one that actually opened the app itself.
Any advice would be brilliant!
Thanks!
You should be creating your AppleEvent handlers in -applicationWillFinishLaunching: instead.
The idea is to have your handlers ready to go before your application begins processing AppleEvents.