Activate activity failing - Error: Unable to cast object of type Uipath.core.window to Uipath.core.Uielement

Hi team,

I recently updated my studio from 2019 to 2020 and when I am testing my codes I am getting this issue -
Unable to cast object of type ‘UiPath.core.window’ to ‘UiPath.core.Uielement’

The Activate activity is failing with above error. I know that I am passing Window type variable to the UiElement type variable in this activity. But It was working in old version.

Do any one know why it is failing in new version. And How can I fix it.

Thanks,
Sai

@KishoreC,

Try re highlighting the window again.

Thanks,
Ashok :slight_smile:

The selector is working fine. And even If I recreate the same steps in another sample project it is working fine but not in the current project file.

@KishoreC,

In that case try debugging that what’s the selectors being passed.

Thanks,
Ashok :slight_smile:

Hi @KishoreC

This might be due to the activities package version got updated due to the upgrade. Can you please check the working project packages version and update it in the old one.

Thanks