Level 3 Advanced Training Assignment 1 - Calculate Client Security Hash - Cannot find UI Element

I was trying to finish my level 3 advanced training, but I keep getting this error:


It kills the process right after I scrape through the work items, and log out from the system.
I already tried to use a wildcard for this selector (*) but it still won’t work. It kept on saying that it failed to close normally
Can you guys help me out with this?
Thanks!

Hi @UiP_Mc,

Try to remove the parent id from the selector and try again…

Cheers.
Vashisht.

Hi @Vashisht,

Sorry for the late reply.
I’m still having the same error even after removing the parent id.

Regards,
Mc

Can you try delete spaceing?
ACME System1 -*

Hi @111181,

I tried to do that and still received the same error:

Regards,
Mc

@UiP_Mc

Please check if this activity is within the attach browser activity in the System1_close xaml. If not , please try by using it within the Attach browser activity.

Hi @SowmyaLeo,

Yes it’s inside an attach browser activity:
image
Attach browser selector:
<html title='ACME’ />
Click logout button selector:
<html title=’’ />
<*webctrl aaname=‘Log Out’ tag=‘A’ />

Another weird thing is that if I run this file alone (System1_Close.xaml) and have the browser ready on the page where it’s supposed to close (Work Items), it closes properly, but if I run the main workflow (Main.xaml) it gives me this error.

Regards,
Mc

When I highlight my Attach Browser activity I get this:

It’s supposed to work, right?

EDIT: This is where the workflow stops for 10-15 seconds and closes the tab, waits for a few seconds then prompts me the error (Applications failed to close normally - check error above)

@UiP_Mc

  1. In the first post in this thread you had mentioned that it kills the process right after the scraping is done and it logs out from the system.
    When the log out has already been done, it will go to the main login screen. When the System1_close xaml is triggered , it tries to attach the window and finds no logout option there, so it fails.
    Within the attach browser add an activity “Element exists” and Indicate the “Log Out” from the screen.
    Use an If activity to check If this element is found then click on Log Out.
  2. Attach Browser:
    Ensure your attach browser “BrowserType” is correct. If you are using IE choose the browser type as IE and if you are using Edge choose “Edge”.

Hi @SowmyaLeo

Is this right?


Regards,
Mc

@SowmyaLeo,

I get the following error:

Regards,
Mc

@UiP_Mc

Please try this for the selector:
image

html app=‘iexplore.exe’ title=‘ACME System 1 - *’ /

Keep the app open in IE and then edit the selector and click on the Validate button to see if it is Validated .Then try running it again.

@SowmyaLeo

Still getting the same error. How is this possible?

Regards,
Mc

@UiP_Mc

  1. Does this work when only this sequence is run?
  2. When running from the main workflow, is this window still open when the System1_close.xaml is invoked?
1 Like

@SowmyaLeo

Basically, the System_Close1.xaml when run alone works fine, but Main.xaml doesn’t. (It prompts the error above.)

Regards,
Mc

2 Likes

@UiP_Mc
Ok so there is no problem with System1_close.xaml
Let’s focus on Main now.
In the main kindly run in debug mode and check what happens after data scraping .

Hi @SowmyaLeo, sorry for the late response, I must’ve passed on reading the reply notification.

This is my error after debugging:

I hope you still have the time to help me with this.
Regards,
Mc

@SowmyaLeo,

I tried to continue the debugging process and got the following errors:

After having the bot to close the application, I got this error:

Overall error after the debug:

Regards,
Mc

Hi ,

The Attach Browser selector is incorrect,

When you attach with title “ACME” it looks fpr an exact match of ACME which it doesn’t find. So it should be “ACME *” or one of the below:

- For Internet explorer.

Cheers,

Sowmya

Hi,

Try with this selector. This will definitely work.

webctrl aaname=‘Log Out’ parentid=‘bs-example-navbar-collapse-1’ tag=‘A’

image