SilkTest Question:

Download Job Interview Questions and Answers PDF

I ca not simple use DialogBox ( ).Close () from some reason it is not working?

SilkTest Interview Question
SilkTest Interview Question

Answer:

I have a button that upon clicking on, pops a second BrowserChild. This window however does not have the usual toolbar. It is actually generated by a javascript function (openWindow). How do I close that window. I can't simple use "DialogBox (" ").Close ()" from some reason it is not working.


The trully depends on how the second window is declaried.
I work with browsers that have popup windows (using JavaScript) that contains no Browser characterists (no toolbar, status bar, location, etc). So, Silk views the browser as a dialog, but declaring it as a dialog, it fails. It also see's a browser inside. So, I let Silk declare it as a dialog and typically get something like:
[code]
[-] window DialogBox DBCreateOffer
[ ] tag "Requisition Create?Edit"
[-] window BrowserChild BCCreateOffer
[ ] tag "Create Offer"
[ ] parent "CustomBrowser"
[/code]
I then modify the declaration that Silk made and make the BrowserChild part of the dialog:
[code]
[-] window DialogBox DBCreateOffer
[ ] tag "Requisition Create?Edit *"
[-] BrowserChild BCCreateOffer
[ ] tag "Create Offer"
[/code]

I can then close the browser "dialog" by calling:
DBCreateOffer.Close()

Download SilkTest Interview Questions And Answers PDF

Previous QuestionNext Question
Need help regd. silk test runing thr .bat file on cmd prompt?Getting following error on selecting an item from a ListBox?