Topic
  • 5 replies
  • Latest Post - ‏2012-10-23T15:14:36Z by zariftech
saibenaka@1
saibenaka@1
26 Posts

Pinned topic RFT- how to make an a popup window active and click open button

‏2012-07-12T17:23:11Z |
Hi,

I have scenario where a file has to be browsed. once clicked on Browse , a pop up window to select a file is displayed. I want the RFT to type the pasth of the file and click open button.
tried using Iwindow..wasnt successful..any ideas
Updated on 2012-10-23T15:14:36Z at 2012-10-23T15:14:36Z by zariftech
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: RFT- how to make an a popup window active and click open button

    ‏2012-07-13T06:41:58Z  
    Hi,

    RFT generally has difficulties to manipulate standard windows popups. Assuming that your popup will focus on file path text box when it opens, you can call inputKeys(file path + ENTER).
  • shiridisai
    shiridisai
    64 Posts

    Re: RFT- how to make an a popup window active and click open button

    ‏2012-07-20T18:16:27Z  
    IWindow[] aWindows = getTopWindows();
    IWindow xFilePopup;
    for (int i=0; i < aWindows.length; i++) {
    if (aWindows[i].getText().startsWith("https://google.com/")) {
    xFilePopup = aWindows[i];

    xFilePopup.restore();
    }}

    //
    button_saveACopy().click(atPoint(15,20));
  • newbie_tiwari
    newbie_tiwari
    12 Posts

    Re: RFT- how to make an a popup window active and click open button

    ‏2012-09-13T12:10:24Z  
    IWindow[] aWindows = getTopWindows();
    IWindow xFilePopup;
    for (int i=0; i < aWindows.length; i++) {
    if (aWindows[i].getText().startsWith("https://google.com/")) {
    xFilePopup = aWindows[i];

    xFilePopup.restore();
    }}

    //
    button_saveACopy().click(atPoint(15,20));
    browser_htmlBrowser(document_myYrcClaimStatusAttac(),DEFAULT_FLAGS).inputChars("\\\\corp.usfc.com\\admin\\Users_TechServices\\yrp191\\My Documents\\aaProj_Documents\\reddaway code.txt
    ClaimsInquiry_attachFiles_table().click(atCell(atRow(atIndex(0)), atColumn(atIndex(0))));
    sleep(1);
    


    I am entering the path manually in the text box available next to the browse button, hoping this code may help u
    Updated on 2014-03-25T12:59:36Z at 2014-03-25T12:59:36Z by iron-man
  • newbie_tiwari
    newbie_tiwari
    12 Posts

    Re: RFT- how to make an a popup window active and click open button

    ‏2012-09-13T12:11:47Z  
    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">browser_htmlBrowser(document_myYrcClaimStatusAttac(),DEFAULT_FLAGS).inputChars("\\\\corp.usfc.com\\admin\\Users_TechServices\\yrp191\\My Documents\\aaProj_Documents\\reddaway code.txt ClaimsInquiry_attachFiles_table().click(atCell(atRow(atIndex(0)), atColumn(atIndex(0)))); sleep(1); </pre>

    I am entering the path manually in the text box available next to the browse button, hoping this code may help u
    ("\\\\corp.usfc.com\\admin\\Users_TechServices\\yrp191\\My Documents\\aaProj_Documents\\reddaway code.txt");
    
    Updated on 2014-03-25T12:59:30Z at 2014-03-25T12:59:30Z by iron-man
  • zariftech
    zariftech
    38 Posts

    Re: RFT- how to make an a popup window active and click open button

    ‏2012-10-23T15:14:36Z  
    Hi New,
    Did shiridisai suggession worked?If so can you give us the complete path and usage, so that we can also use it. Thank a lot.