How can I set web element attribute "hasFocus" to True?

Hello everyone !
I have a scenario where i have to set the hasFocus attribute of element to True before typing something.

I know i can use “Set web attribute” activity to do so.
But it’s only showing as inner and outer HTML.
Where can i set the value to True to make TextBox as focused ?

@Prabin_Chand

You can either use focus activity for that

Or

try using set attribute and give the required name…you need not select feom
The dropdown alone

Or

Use a click on that element to get it to focus

Hope this helps

Cheers

I am working on java based web application which is old web app.
Text box is not accepting click activity.
also set focus is not working

@Prabin_Chand

Did you try installing java extension if that works…

I guess you would have tried simulate click …try with setting thw simulate click property to false

Also if there is an option to use any shortcuts to set focus like key strokes try those as well

Cheers

I have already installed java extension

does key strokes works in background ?

I tried setting the web attribute of Text box (has foucs = True ) but set web attribute activity thrown error as Catastophic failure

Hi @Prabin_Chand ,

Could you show us a Screenshot of how you have provided the values for the Set Web Attribute Activity ?

If you could show us more details of the Error Message if any, it would also be helpful.


@Prabin_Chand ,

Not sure if this was tried at first, but have you tried to use Type Into Activity directly and if an error has occurred, Could you let us know what was the error faced when it was used ?

Also, Did you enable the Activate Property in Type Into Activity and checked if it works ?

activate property is by default enabled for hardware or simulate click

@Prabin_Chand

I am sure typeinto should work we are working on a similar interface…If that does not work then use a click and type into with selector of whole window and activate or click before set to false. In Click do a hardware click and also give the selector of the text box

cheers

First of all, That inbox box is not excepting click functionality, therefore its not allowing for click in that box.

Using ui explorer i found : when that input box is focus= True that only type into is working perfectly. when input box is focus = False , type into activity gets fail.

@Prabin_Chand

So manually how to you type? how does it work…would it take a tab to get it activated…perform similar steps with bot…Is it controlled by any other field…if so clicka nd use tab from there

cheers

When the webpage is opened, by default username Input Box is focused as webpage is in foreground at the time of opening browser.

But when screen is locked or when the webpage is not focused type into fails.

@Prabin_Chand

Did you try activating the window to get to foreground or click on any other place to make the screen active?

cheers

I want to run my process in lock screen.
Brining web page to foreground, is not proper solution I think so.

@Prabin_Chand

Do you mean to run in unattemded?

If so then you can still do these bringing to foreground would not hurt the process in unattended

Cheers

Yes, after completing all the process in studio. I am gonna upload the package and run in unattendend mode.

But while testing in studio without uploading to orchestrator , my process is not running in background. The input box for username is needed to focused to proceed further

@Prabin_Chand

Unattended doesn’t necessarily be a background process…it can be a foreground as well and focusing ot getting the target application to foreground is important as to send inputs to the target application…

So please try to get the application to foreground

Cheers

Yes sir,
I just used activate activity to bring browser to front. but it thrown error as : “cannot bring the target application in foreground because window session is locked”