Can I hardcode the "Continue After Failure" checkbox on a coded ui ordered test? - coded-ui-tests

Our testing team keeps getting tripped up by the "Continue after failure" checkbox getting unchecked and then the ordered test checked-in, causing our nightly run to get hosed. Is there a way to disable the checkbox and hard-code it to the checked state so that it's always checked?

I was able to get around the problem by adding the 'continueafterfailure' attribute to the XML for the ordered tests at the start of each build. This way the checkbox functions as it normally would, but you cannot build without causing the box to become checked.

Related

Python Pywinauto detect window based on existence of certain class_name

Background:
I am trying to automate an installer that will be distributed to a bunch of different computers. Some of these already have a MS distributable file, some of them don't. The ones without this file have this inside the window control identifiers:
child_window(class_name="SysHeader32")
The reason this is important is that this will be an extra step in the installation that needs to have a button pressed. Is there a way to make an if loop similar to:
if main_dlg.child_window(class_name="SysHeader32") exists:
click install
proceed normally
else:
Proceed normally
How would I implement this?
I have it working without the extra step, but if this extra step is present, the install fails.
There is method .exists(timeout=5) which returns True/False instead of raising exception like other methods do. Of course, try-except block is also possible, but .exists() looks better as a logic than an error handling.
BTW, else branch is not needed. Just proceed normally after the condition code is executed or not.

How to troubleshoot "We couldn’t find a run python"?

I'm working on a pre-existing python code-by-zapier zap. The trigger is "Code By Zapier; Run Python". I've made some changes to the contained python script, and now when I go to test that step I run into the following error message:
We couldn’t find a run python
Create a new run python in your Code by Zapier account and test your trigger again.
Is there any way of figuring out what went wrong?
I'm guessing a little bit, but I think this issue stems from repeatedly testing an existing trigger without returning a new ID.
When you run a test (or click the "load more" button), then Zapier runs the trigger and looks through the array for any new items it hasn't seen before. It bases "newness" on whether it recognizes the id field in each returned object.
So if you're testing code that changed, but is returning objects with previously seen ids, then the editor will error saying that it can't find any new objects (the can't find new run pythons is a quirk of the way that text is generated; think of it as "can't find objects that we haven't seen before).
The best way to fix this depends on if you're returning an id and if you need it for something.
Your code can return a random id. This means every returned item will trigger a Zap every time, which may or may not be intended behavior.
You can probably copy your code, change the trigger app (to basically anything else), run a successful test (which will overwrite your old test data), and then change it back to Code by Zapier and paste your code. Then you should get a "fresh" test. Due to changes in the way sample data is stored, I'm not positive this works now
Duplicate the zap from the "My Zaps" page. The new one won't have any existing sample data, so you should be able to test normally.

Blue Prism: Object not found when ran using Control Center, but runs without issue through Process Studio

During my process there is a drop-down html element that I have spied and set correctly. I run through the Object and Process studio without any issues. Once the same process is ran through the Control Room the element throws and error that it cannot be found.
I have tried multiple different configurations without any luck and the element is still found without issue when ran manually. I even checked by signing into the VM having it error and on the second retry had the VM up; at this stage the element was found without issue. It seems to only be when the bot is running and the screen is not up. No other elements give this issue and the next step is the same dropdown, but for a stop time not start.
Any help would be appreciated!
I have added pics of the STARTSPIED - START and ENDSPIED - END spied configs,the Navigation Stage, and the process correctly running in the Object Studio OB Studio correct.
Thank you!
For the person who down-voted this item...Configs here are my two days of config changes and research that I tried on my own before asking for help. This is my 5th automation that I have put into deployment without help, so thank you for down-voting someone trying to get help where they are stuck.
Your problem is most likely connected with the fact that processes run in the control room are executed much faster than in studio and your webpage might not be loaded on time (that would explain why it works after retry).
Best practice approach would be to add a dynamic wait stage after attach and use “Parent Document Loaded” option on the element you want to interact with. It will wait for the page to be loaded and then check exist for the element. I would also suggest splitting your action into two, first to set start date and second for end date.

goconvey not showing coverage of packages

In goconvey, there's a feature that shows package coverage, and when you click on the package under analysis, the go coverage tool pops up, showing the source code, colored by what has and hasn't been covered.
For example:
However, there are many packages in my SUT that, when clicked on, don't show any test coverage, and even 404. For example, clicking on package db from that list:
Another example:
What is causing this and how do I remedy it?
Not sure if it applies to this case but for me in Mac I had to run the goconvey tool in sudo mode (i.e Admin in Windows). Otherwise the intermediate files/dirs creation failed with the tool/webserver reporting 'no coverage'.
Since you are receiving 404, did you validate if the coverage report dir/files were created?

"You must save the changes before you can convert this activity" on Fax entity

As you can probably take out from the title, I have a problem on my CRM environment converting a fax entity to an incident (case), it is as you know an out of the box functionality. When I press the button on the ribbon to convert it to a case, I'm given the following error: "You must save the changes before you can convert this activity". And I have definitely saved everything before I do this.
I do have the latest rollup and it works for the other activity entities except from this one. Is there any chance someone had similar issues? If so could you share how you resolved this. Thanks in advance.
There is likely some code running on the form that updates one or more values on the page automatically. Code like that will cause the form to become "dirty". Which is what triggers the message you are seeing.
One way to solve it, is modify your code to perform a save after it make its changes.

Resources