Robotic Process Automation (RPA)

 View Only
  • 1.  Set Value to Field but no text was entered

    Posted Thu June 15, 2023 09:10 AM

    Hi,

    I'm new and still learning IBM RPA Studio. I have a question, when I set value to field and try to start running, no text was entered and no warning/error.

    But when I start running and toggle breakpoint in set value to field section, text was entered. 

    How can I solved this issue?

    This is the script :

    defVar --name firefox --type Browser
    webStart --name browserFirefox --type "Firefox" firefox=value
    webNavigate --url "https://ibank.bankmega.com/corp/common2/login.do?action=loginRequest"
    webSet --value test --selector "CssSelector" --css "#corpId"
    webSet --value test1 --selector "CssSelector" --css "#userName"
    webSet --value testpass --selector "CssSelector" --css "#passwordEncryption"
    webClose --name browserFirefox --leavebrowseropen

    Thank you

    Wahyu



    ------------------------------
    Muhammad Ramadhan
    ------------------------------


  • 2.  RE: Set Value to Field but no text was entered

    Posted Mon June 19, 2023 08:49 AM
    Hello Muhammad,
     
    As we can see when loading on the page, a few times the input element has not yet been created, which is why it has not filled in the fields. If you navigate to the Help > Studio Tab, you may see warning messages that the elements were not found.
    A good practice is that every time you navigate between pages or perform an action that generates new elements on the screen, you must use the commands below:
    - webWait - to wait to complete the page request
    - webWaitElement - to wait for the element to load
     
    One more observation, the time out of these commands is the maximum time that will wait for them to be loaded, if they are loaded before, the execution is continued.
     
    Follow your code.
    defVar --name firefox --type Browser
    defVar --name elementExist --type Boolean
    webStart --name browserFirefox --type "Firefox" firefox=value
    webNavigate --url "https://ibank.bankmega.com/corp/common2/login.do?action=loginRequest"
    webWait --timeout "00:00:30"
    webWaitElement --selector "CssSelector" --css "#corpId" --timeout "00:00:10" elementExist=value
    webSet --value test --selector "CssSelector" --css "#corpId"
    webSet --value test1 --selector "CssSelector" --css "#userName"
    webSet --value testpass --selector "CssSelector" --css "#passwordEncryption"
    webClose --name browserFirefox --leavebrowseropen


    ------------------------------
    Angelo Alves
    IBM RPA Technical Specialist
    ------------------------------



  • 3.  RE: Set Value to Field but no text was entered

    Posted Mon June 19, 2023 11:52 PM

    Hi Angelo,

    Thank you for your reply, I've quite understand your explanation.

    For this issue has been resolved.



    ------------------------------
    Muhammad Ramadhan
    ------------------------------



  • 4.  RE: Set Value to Field but no text was entered

    Posted Mon June 19, 2023 12:37 PM

    Hi ,Muhammad Ramadhan , I've made just little correction to your code and with Chrome browser works correct:

    defVar --name firefox --type Browser
    defVar --name browser --type Browser
    defVar --name trueFocus --type Boolean
    webStart --name browser --type "Chrome" browser=value
    webNavigate --url "https://ibank.bankmega.com/corp/common2/login.do?action=loginRequest"
    delay --timeout "00:00:03"
    webFocus --selector "XPath" --xpath "/html/body/center/form/table/tbody/tr[2]/td[2]/div/table[2]/tbody" trueFocus=value
    webSet --value test --selector "CssSelector" --css "#corpId"
    webSet --value test1 --selector "CssSelector" --css "#userName"
    webSet --value testpass --selector "CssSelector" --css "#passwordEncryption"
    webClose --name browser --leavebrowseropen



    ------------------------------
    [Alexander] [Krastev]
    [Junior RPA Consultant]
    [ServiseCentrix ]
    ------------------------------



  • 5.  RE: Set Value to Field but no text was entered

    Posted Mon June 19, 2023 11:54 PM

    Hi Alexander,

    I've followed your code and it worked
    Thank you for the correction


    ------------------------------
    Muhammad Ramadhan
    ------------------------------