Blueprsim is not detecting any thing on page when object is ran from Process studio - blueprism

I'm facing an annoying issue in Blueprism a little help will be appreciated.
The error is when I run the task I have created in object studio directly in object studio it runs successfully but when I try to run the same task from process studio using action It throws an error. The application is launched but get this error. (Application is web-based.)
Internal: Failed to perform step 1 in Read Stage 'Reader1' on page 'Main' - No elements match the supplied query terms
this is Application Modeller Settings
Application Modeller
And this is how I call it in Process
Object Called in process
Action Properties
Wait Settings are following
When I try to highlight the link it does highlight it.

I think that after your Reader1 should be a decision if element was found or not and then you can proceed with log-in. But I'd check if the element you're spying is working correctly. Maybe try passing value of reader from object to process.

A process in BluePrism can have different speed of execution depending on the way you're running it.
If you're running application using "Step" function (hotkey F5), then BluePrism waits a long time between executing actions. A "Step above" (hotkey F10) is much faster, but the fastest possible speed of execution is from control room.
The delay from "Step", or "Step above" can be enough to make process work during the development. Once the process is moved to control room, then the delay is gone and sometimes the process might be running too fast. It can happen, that the BluePrism is trying to interact with the element that does not yet exist.
To make process work in control room, you need to have additional wait stages that will ensure that the process is not running ahead of the applications that are being automated. Whenever you're interacting with any element then you need to be sure that it exists.
i suspect that you're waiting for an element, but then you're trying to read a different one. It's important to wait for the exact element that you want to interact with, as elements can appear in an order, that can make your process crash.

Related

Scala 3 with ScalaFX thread related problem

I have an application that has multiple screens and a process that needs to get UI info from some and update others.
Tried many methods but the result always is always "not a Java FX thread". Without using some kind of thread the UI does not update Because of the multi screen nature of the app (not practical to change) I need to fundamentally change the application architecture which is why I am not posting any code - its all going to change.
What I cant work out is the best way to do this and as any changes are likely to require substantial work I am reluctant to try something that has little chance of success.
I know about Platform.runLater and tried adding that to the updates but that was complex and did not seem to be effective.
I do have the code on GitHub - its a personal leaning project that started in Scala 2 but if you have an interest in learning or pointing out my errors I can provide access.
Hope you have enjoyed a wonderful Christmas.
PS just make the repo public https://github.com/udsl/Processor6502
The problem is not that the Platform.runLater was not working its because the process is being called form a loop in a thread and without a yield the JavaFX thread never gets an opportunity to run. It just appeared to be failing โ€“ again I fall foul of an assumption.
The thread calls a method from within a loop which terminates on a condition set by the method.
The process is planned to emulate the execution of 6502 processor instructions in 2 modes run and run-slow, run-slow is run with a short delay after each instruction execution.
The updates are to the main screen the PC, status flags and register contents. The run (debug) screen gets the current instruction display updated and other items will be added. In the future.
The BRK instruction with a zero-byte following is captures and set the execution mode to single-step essentially being a break point though in the future it will be possible via the debug screen to set a breakpoint and for the execution of the breakpoint to restore the original contents. This is to enable the debugging of a future hardware item โ€“ time and finances permitting โ€“ itโ€™s a hobby after all ๐Ÿ˜Š
It terns out that the JavaFX thread issue only happens when a FX control is written to but not when read from. Placing all reads and writes in a Platform.runLater was too complex which is why I was originally searching for an alternative solution but now only needed it protect the writes is much less a hassle.
In the process loop calling Thread.โ€™yieldโ€™() enables the code in the Platform.runLater blocks to be executed on the JavaFX thread so the UI updates without an exception.
The code in the Run method:
val thread = new Thread {
override def run =
while runMode == RunMode.Running || runMode == RunMode.RunningSlow do
executeIns
Thread.`yield`()
if runMode == RunMode.RunningSlow then
Thread.sleep(50) // slow the loop down a bit
}
thread.start
Note that because yield is a Scala reserved word needs to quote it!

Blue Prism unable to identify object" no elements match the supplied query terms"

I am very new to the RPA and trying to automate a simple process using blue prism(opening a web based application -->clicking on an link and filling the form).
While running the object studio step by step i am able to navigate till end but while running the flow from process studio, after the website is getting opened i am getting error "no elements match the supplied query items"
A process in BluePrism can have different speed of execution depending on the way you're running it.
If you're running application using "Step" function (hotkey F5), then BluePrism waits a long time between executing actions. A "Step above" (hotkey F10) is much faster, but the fastest possible speed of execution is from control room.
The delay from "Step", or "Step above" can be enough to make process work during the development. Once the process is moved to control room, then the delay is gone and sometimes the process might be running too fast. It can happen, that the BluePrism is trying to interact with the element that does not yet exist.
To make process work in control room, you need to have additional wait stages that will ensure that the process is not running ahead of the applications that are being automated. Whenever you're interacting with any element then you need to be sure that it exists.

How to specify dependency between multiple given, when or then in cucumber-jvm

I have a feature file which has multiple given when and then steps for ex
// File My.feature
Give doUserLogin
And changeUserPreference
When executeWhen1
And executeWhen2
Then executeThen1
And executeThen2
These are mapped to step definitions correctly, the problem i'm facing is that some are getting executed parallel for ex. in given, 'changeUserPreference' is happening before 'doUserLogin'. Similarly in Then part, 'executeThen2' is triggered before 'executeThen1' is fully completed.
How to specify the dependency between these statements.Is there any way i can say don't start execution of second statement(given, when or then) until first one is executed completely.
If your 'doUserLogin' step is exiting before the download completes, that would explain why the 'changeUserPreference' is starting up. This could happen, say, if you were connecting to an external system and initiating a download and then the api you are using is performing the download in another thread, then the main thread would continue on to the next step while the download is continuing in another thread.
My advice would be to execute this scenario in debug mode (assuming you are using an IDE that supports this) and see if your 'doUserLogin' step is finishing before the file download.

wxpython using gauge pulse with threaded long running processes

The program I am developing uses threads to deal with long running processes. I want to be able to use Gauge Pulse to show the user that whilst a long running thread is in progress, something is actually taking place. Otherwise visually nothing will happen for quite some time when processing large files & the user might think that the program is doing nothing.
I have placed a guage within the status bar of the program. My problem is this. I am having problems when trying to call gauge pulse, no matter where I place the code it either runs to fast then halts, or runs at the correct speed for a few seconds then halts.
I've tried placing the one line of code below into the thread itself. I have also tried create another thread from within the long running process thread to call the code below. I still get the same sort of problems.
I do not think that I could use wx.CallAfter as this would defeat the point. Pulse needs to be called whilst process is running, not after the fact. Also tried usin time.sleep(2) which is also not good as it slows the process down, which is something I want to avoid. Even when using time.sleep(2) I still had the same problems.
Any help would be massively appreciated!
progress_bar.Pulse()
You will need to find someway to send update requests to the main GUI from your thread during the long running process. For example, if you were downloading a very large file using a thread, you would download it in chunks and after each chunk is complete, you would send an update to the GUI.
If you are running something that doesn't really allow chunks, such as creating a large PDF with fop, then I suppose you could use a wx.Timer() that just tells the gauge to pulse every so often. Then when the thread finishes, it would send a message to stop the timer object from updating the gauge.
The former is best for showing progress while the latter works if you just want to show the user that your app is doing something. See also
http://wiki.wxpython.org/LongRunningTasks
http://www.blog.pythonlibrary.org/2010/05/22/wxpython-and-threads/
http://www.blog.pythonlibrary.org/2013/09/04/wxpython-how-to-update-a-progress-bar-from-a-thread/

QAbstractItemModel Lazy Loading locks application

I have implemented canFetchMore, hasChildren and fetchMore in order to allow my model to be lazy loaded. It's very simple and based on QT's: http://doc.qt.io/archives/qt-4.7/itemviews-simpletreemodel.html
My problem is that in my application fetching children is not a very quick operation, it involves a few seconds of delay on the server side while it figures out who the children actually are.
I'm unsure how to deal with that. I can't have my application locking up for several seconds every time someone expands a node. I don't know how to go about making this happen in the background. If I was to create a sub-process or thread to actually do the work of retrieving the children and updating the client side data structure, how would I go about telling the model that this had successfully completed (and for the node to finally expand).
Also, is there a way to show that the node is currently in the process of loading the data in the background?
Apologies if these are stupid questions, GUI programming is still a bit of a mystery to me and I've never used QT before.
For the record, I'm using Python, but if answers are given in C++ I can understand them.
Thanks
If I was to
create a sub-process or thread to actually do the work of retrieving
the children and updating the client side data structure, how would I
go about telling the model that this had successfully completed (and
for the node to finally expand).
You can use signal and slots. In the thread you retrieve the data you will emit a custom signal like someDataAvailable(YourdataType) and then in the gui you will handle this signal with a slot something like handleDataReadySignal(YourdataType). The signal passes the object that you give it when emitting. Apparently you need to update the gui and the list in the handleDataReadySignal slot. Of course you need to connect the slot to the signal preferably in the constructor of the window/dialog to which the list is attached

Resources