How to click on Open/save/save as/cancel button on IE 11 using vba - vba

I would like to click on open when a file download dialog appear in IE 11. I found this code http://www.siddharthrout.com/2011/10/23/vbavb-netvb6click-opensavecancel-button-on-ie-download-window/
But this code does not work with IE11. I have also attached the IE11 download dialog box here too. Anyone has any idea, please, help.

You can use Alt+N to focus on the Notification Bar.
And then send {tab} key to navigate to the specific button.
With VBA, you may use Autohotkey.dll or AutoItX3.dll to send these hotkey combinations.

Related

Textbox events?

I am using Kantu to automate filling out some forms. There is a textbox that when a persons id number is entered and you click into another box or tab out of the textbox it will load that persons vcard. I can try to expound if you need more clarity.
I don't know much but i'm guessing me clicking into another box is activiating some kind of event to load this vcard. I can't seem to simulate this. Does anyone know of a way to do so?
Welcome to SO. There are different option to get the associated events.
Let's take the stackoverflow search box (the one which is on the top with s-input js-search-field class)
1) Using getEventListeners
Go to chrome console in the dev tools and then use getEventListeners(element).
getEventListeners(document.querySelector('.s-input.js-search-field '))
2) Using Dev Tools Event Listner
Go to chrome dev tools and select the element for which you want to know the events, click on the Event Listeners tab on the right hand side pane.
3) Using the firefox event
Goto dev tools in firefox and click on events bubble at the end of html element tag.
Sample of code
I consulted with a friend who showed me the problem was an onblur event triggered by clicking away.
The solution to my problem was to call the event using the following line,
{
"Command": "storeEval",
"Target": "lawformTextBlur(document.getElementById('_f4'))",
"Value": ""
},

Can I make popup screen or file upload automatically with selenium?

Good morning. I have a web page control with selenium. However, when I click the button of the site, a pop-up screen appears and I want to test that the file attachment is saved by pressing the file attachment button in it. Can you control selenium with two windows (parent, child-popup) going up and down?
I guess you want to interact with file upload dialog which is native window via selenium. That is not possible. However you can select file to upload using sendKeys without the dialog being opened.
Something like that
fileInput.sendKeys("/path/to/local/file");

How to identify Adobe flash player pop-up window using selenium for validation?

Is there a way selenium can identify and validate a Adobe flash player pop-up window?
say, you visit this site (http://sports.coral.co.uk/#) and click on "Coral Radio" submenu under Sports Menu. It opens a Adobe pop-up window. I can validate the presence of a pop-up window opening and close it, but I want to know if there is a way to assert on some content of that window? at least the title of the page before I close it?
Thanks for responding if anyone knows how to deal with this scenario.
To switch to a popup window, you need to use driver.getWindowHandles() and iterate through them. Then you can use driver.getTitle();
I've never found a way to get any content from Flash. I've heard something about automatic screenshots in headless mode, but then you have to check it manually probably again.

How to click on alert box ok button using nightwatch.js

I am working on ui automation testing using nightwatch.js, i am struggling on a point, i want to click on alert box's "OK" button but i am unable to do it because i didn't find anyway to press alert box's "OK" button on browser using nightwatch.js.
is there any way please suggest.
You can use the Selenium acceptAlert protocol. It can be used like this:
browser
.url(APP_ROOT)
.waitForElementVisible('.classThatOpensAlert', 2000)
.click('.classThatOpensAlert')
.pause(1000)
.acceptAlert()

Visual Basic - download from WebBrowser

I'm pretty new to visual basic, but have been looking far and wide and have had no luck finding an answer to this anywhere. I've used WebBrowser to navigate to a webpage. On this page there's a link to click which will then download a csv file.
I've got my program to click this link using:
WebBrowser1.Document.GetElementById("elementID").InvokeMember("click")
But I'm not sure how to handle the 'file download' dialog box that pops up. One way, I'm thinking, is to use sendkeys to click the 'save' button, but this seems a bit clunky.
I'm wondering if I can use FileDownload somehow to handle this box before it pops up. (Microsoft's documentation says: "If a file download dialog box can be displayed, this event fires prior to the appearance of the dialog box.")
Any know if this is possible or do you have any other smart ideas for solving this problem?