Hi Jan,
I attach the whole script:
webStart --name TWIQ --type "Chrome"
webNavigate --url "https://xxxxxxx.com/jira"
webSet --value xxxxx --selector "Name" --name os_username
webSet --value "${Clave}" --selector "Name" --name os_password
webClick --selector "IdAndName" --id login --name login
webWait --timeout "00:00:10"
webNavigate --url "https://xxxxxxx.com/jira/secure/Tempo.jspa#/reports/logged-time?columns=WORKED_COLUMN&dateDisplayType=days&filterId=100000&from=2021-06-01&groupBy=project&groupBy=worker&groupBy=worklog&periodType=CURRENT_PERIOD&subPeriodType=MONTH&to=2021-06-30&viewType=TIMESHEET"
webWait --timeout "00:00:10"
webClick --selector "XPath" --xpath "/html/body/div[1]/div/div/div/div/div[2]/div/div[2]/div[3]/button"
webWaitElement --selector "XPath" --xpath "/html/body/div[1]/div/div/div/div/div[2]/div/div[2]/div[3]/button"
webClick --selector "XPath" --xpath "/html/body/div[1]/div/div/div/div/div[2]/div/div[2]/div[3]/div/section/div[2]/article[4]/div"
webWaitDownload --saveto "C:\\Users\\ahernandez\\Desktop\\IBM" --nametosave PruebaInlogiqAnyer --extension xls File=filename
webNavigate --url "https://xxxxxxxx/jira/projects/XXXX/issues/XXXXXX-11"
webWait --timeout "00:00:10"
webClick --selector "XPath" --xpath "/html/body/div[2]/div/div[1]/div/main/div/div/div/div/div/div/div[2]/div[1]/div/div/div/div[1]/div[4]/div[2]/div/span/button"
--simulatehumangetControl --selector "XPath" --forcerefresh --xpath "/html/body/div[1]/div/div[1]/div/main/div/div/div/div/div/div/div[2]/div[1]/div/div/div/div[1]/div[4]/div[2]/div/span/button"
If it works, click on other buttons on the website.
When I click Explorar, it should open a window to browse the documents on my computer and allow me to search for the report to attach. I really don't know if this is the best practice, is there any other way to do it?
Can you give me an example of how the "Enter Keys" command works.
I remain attentive to your comments.Regards.
------------------------------
Anyer Hernández
------------------------------
Original Message:
Sent: Wed August 18, 2021 03:48 AM
From: Jan Lorenz
Subject: Attach file on a web page
Could you send more of the Script Code before the error occurs? Does it work to click on other buttons on the website opened?
Another spontaneous idea which might help fix the problem: Try turning the option "Simulate Human" on in the webClick command.
The last possibility I would suggest is to use "Enter Keys' command and to go through the webpage by using {TAB}s and {ENTER} when the desired Explore Button is focused.
------------------------------
Jan Lorenz
------------------------------
Original Message:
Sent: Wed August 18, 2021 02:50 AM
From: Anyer Hernández
Subject: Attach file on a web page
Hi Jan,
Thanks for answering.
The line that generates the error in the script is this:
webClick --selector "XPath" --xpath "/html/body/div[2]/div/div[1]/div/main/div/div/div/div/div/div/div[2]/div[1]/div/div/div/div[1]/div[4]/div[2]/div/span/button"
I have added the command that you indicate:
getControl --selector "XPath" --forcerefresh --xpath "/html/body/div[1]/div/div[1]/div/main/div/div/div/div/div/div/div[2]/div[1]/div/div/div/div[1]/div[4]/div[2]/div/span/button"
And it gives the following error:
WDG.Automation.Windows.WindowNotAttachedException: Se produjo una excepción de tipo 'WDG.Automation.Windows.WindowNotAttachedException'.
en WDG.Automation.Windows.BaseWindowControlCommand.EnsureWindow(WindowsContext context)
en WDG.Automation.Windows.GetControlCommand.ExecuteCore(WindowsContext context)
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
en WDG.Automation.Language.ErrorHandler.lUFtgfS6B3UXYO8FnHA(Object )
en WDG.Automation.Language.ErrorHandler.mGnpEI0m8x(Exception )
en WDG.Automation.Language.ErrorHandler.HandleExecutionExceptionIfNeeded(Exception exception, IAutomationCommand command)
en WDG.Automation.Language.CommandInterpreter.<Run>d__12.BjWVfHiEeDw1YyIIoxS(Object , Object , Object )
en WDG.Automation.Language.CommandInterpreter.<Run>d__12.MoveNext()
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
en WDG.Automation.Language.ScriptInterpreter.<RunCore>d__17.MoveNe
I do it with XPATH because it has worked for me in the previous steps before getting to this last one. With ID and Class it doesn't work.
I remain attentive to your comments.
Regards.
------------------------------
Anyer Hernández
Original Message:
Sent: Tue August 17, 2021 04:34 PM
From: Jan Lorenz
Subject: Attach file on a web page
Hi Anyer,
happy to hear that you found your way into the RPA world.
Could you send the Script Code of the last part where the error occurs? This might give more clues.
I suppose it might be because you do not have the website properly attached, especially because you were working with Excel and the image before. Try to add the step before to attach the specific Browser tab.
If that does not work try to use the command "Get Control" before the command which leads to the error. Another developer once gave me this hint and it worked.
Besides, I would recommend to use ID as an identifier within the command if this is possible. That is mostly more reliable than XPATH from my experience.
Best of luck
------------------------------
Jan Lorenz