Closed linolc closed 3 years ago
Hi @LinoLuiz you can try the following -
import rpa as r
r.init()
r.url('https://www.meudetran.ms.gov.br/veiculo.php#')
r.frame('ifrm-pdr-portal')
r.type('sc_clone_placa', 'Teste')
...
The web page uses frames, you can check by searching in Inspector (below image). So there is a need to use frame() to tell the tool that you are looking for elements in that frame and not elsewhere. A web frame is a separate web page / HTML doc.
Also, the input field seems to have duplicates (same id happening twice). You can either append [2] at the end to mean the 2nd match, or use what I did by providing the name attribute which directly points to the correct element.
Lastly, there is no need to wait explicitly, the tool will auto-wait up to timeout of 10 seconds before throwing error.
Even if you need to wait, you can use r.wait() and do not need to import another package like pyautogui to do that.
Thank you so much for your help @kensoh! I researched a lot and found no solution.
I'm trying to enter text in the 'placa' field, but RPA doesn't find XPath. I've tried by ID, Name, among others. The same problem occurs for the other fields and buttons on the page.
[RPA][ERROR] - cannot find //*[@id="id_sc_field_placa"]