SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    FileDialog-Save doesnot work

    Hi,

    As per our application, when i click on a button on the webpage, it opens a new IE window, where i see the file dialog open. The current code, clicks on the save button, if i run in step by step mode, but if it is run together, it doesnot work, From the test results file i see that the save button, is highlighted and shows as if it clicked but doesnot work.

    Set BrowserObjDownloadFile=Browser("title:=.*ExternalL inkCall.*")
    Set Odesc = Description.Create()
    Odesc("is owned window").Value = "True"
    Odesc("nativeclass").Value ="#32770"

    Set oDescButton =Description.Create()
    oDescButton("micclass").Value="WinButton"
    oDescButton("text").Value="&Save"

    Set EditCollection=BrowserObjDownloadFile.Dialog(Odesc ).ChildObjects(oDescButton)
    EditCollection.Count

    If EditCollection.count >0 Then
    EditCollection(0).Click
    End If

    'this is the save that is not working currently, if run continuously, if the save is clicked the rest of the code works.

    ' the entire below portion is working
    wait(2)
    ' now the filesave dialog opens, and asks user for hte location to save
    ' first dialog
    Set Odesc = Description.Create()
    Odesc("is owned window").Value = "False"
    Odesc("ispopupwindow").Value="True"
    Odesc("nativeclass").Value ="#32770"

    ' thi sis for dialog two
    Set Odesc2 = Description.Create()
    Odesc2("is owned window").Value = "True"
    Odesc2("nativeclass").Value ="#32770"

    Set oDescButton =Description.Create()
    oDescButton("micclass").Value="WinEdit"
    oDescButton("attached text").Value="File &name:"

    Set EditCollection=Dialog(Odesc).Dialog(Odesc2).ChildO bjects(oDescButton)
    EditCollection.Count

    If EditCollection.count >0 Then
    EditCollection(0).Set (specialActionParam)
    End If
    Wait(2)
    Set oDescButton =Description.Create()
    oDescButton("micclass").Value="WinButton"
    oDescButton("text").Value="&Save"

    Set EditCollection=Dialog(Odesc).Dialog(Odesc2).ChildO bjects(oDescButton)
    EditCollection.Count

    If EditCollection.count >0 Then
    EditCollection(0).Click
    End If

  2. #2
    Senior Member
    Join Date
    Mar 2010
    Location
    12.985475,80.229696
    Posts
    168
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FileDialog-Save doesnot work

    Try sync before you read the childobject winbutton save
    BrowserObjDownloadFile.Sync

  3. #3
    Senior Member
    Join Date
    Mar 2010
    Location
    12.985475,80.229696
    Posts
    168
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FileDialog-Save doesnot work

    Why don't you use this code
    If Browser("title:=.*ExternalLinkCall.*").Dialog("nat iveclass=#32770","is owned window=True").Exist Then
    Browser("title:=.*ExternalLinkCall.*").Dialog("nat iveclass=#32770","is owned window=True").WinButton("text=&Save").Click
    End If

    Instead of
    ==========
    Set BrowserObjDownloadFile=Browser("title:=.*ExternalL inkCall.*")
    Set Odesc = Description.Create()
    Odesc("is owned window").Value = "True"
    Odesc("nativeclass").Value ="#32770"

    Set oDescButton =Description.Create()
    oDescButton("micclass").Value="WinButton"
    oDescButton("text").Value="&Save"

    Set EditCollection=BrowserObjDownloadFile.Dialog(Odesc ).ChildObjects(oDescButton)
    EditCollection.Count

    If EditCollection.count >0 Then
    EditCollection(0).Click
    End If

  4. #4
    Junior Member
    Join Date
    Mar 2010
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FileDialog-Save doesnot work

    Hi

    Thank you for your reply, i wil try this and let you know if it works.

    Bindu

  5. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FileDialog-Save doesnot work

    Hi

    I tried the code suggested by you, it is still doing the same, it shows from the test results that the button is clicked, but the filedialog is still there.

    Thanks
    Bindu

  6. #6
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: FileDialog-Save doesnot work

    Try changing the replaymethod to mouse/keyboard emulation. Or use a keyboard shortcut if possible.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:42 AM.

Copyright BetaSoft Inc.