Question
Corporation Service Company
US
Last activity: 8 Mar 2018 9:48 EST
How do we set focus on Attach file(s) modal dialog box's Select file(s) input field
See attached file
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
EPAM Systems, Inc.
ES
Hi @DanB2381,
Thanks for posting on PSC.
Refer this post. Hope it may help in resolving the issue at your end. Kindly acknowledge by marking this post as answered/helpful for larger Pega audience and tracking purposes.
Regards,
Asif
Corporation Service Company
US
The post you referred me to does not answer my question. That post talks about Openspan and robotics. My question is related to Selenium WebDriver not being able to access the SelectFile(s) input element on the standard Pega Attach New modal dialog box.
-
Ali Ashroff
Pegasystems Inc.
IN
Hi ,
I tried with the below code from the console and it is working for me:
document.getElementById("$PpyAttachmentPage$ppxAttachName").click();
This ia a javascript code and check if you can use this in selenium or not.
Corporation Service Company
US
Yes, works fine from the console but not in an automated Selenium script. In the script first click the Attach New link on any Pega page and it will pop up the Attach File(s) modal dialog box. Next try your getElementById command to access the dialog box's input element with type = file. Can you access that element in the modal dialog box from the script? .
Pegasystems Inc.
IN
Hi ,
In this you need to see that which document you are currently in ?
May be if you are in the parent doc , you cannot access the doc inside it . So once check the cuurent document..
Corporation Service Company
US
My understanding is that the Attach File(s) modal dialog box is a standard Pega component. I am asking for a specific recommendation on how to set focus on the dialog box's Select File(s) input type=file element from within a script of Selenium commands. In my script I have successfully accessed both the Cancel and Attach command buttons but not the Select File(s) input type=file element. Can someone provide a specific set of steps to set the focus on the Select File(s) input element? My objective is to have an automated process upload a file to that input element.