how to identify download bar in Microsoft edge browser with UFT15 - hp-uft

My requirement is that I need to save the downloaded file in some dynamic location and for that I want to click on 'save as' option available in download bar. However the UFT one(15.02) is unable to identify the download bar in Microsoft Edge browser (v87 64-bit). I tried with UI Automation add-in as well but with UI Automation as well , UFT 15.02 is not identifying download bar not 'save as' button present in the bar. Is there any way by which I can click on save as option button present in download bar in Microsoft edge browser using UFT 15.02??
below is the image of download bar.

I found a workaround for it to click on 'Save As' button on Microsoft edge browser. Hope it is useful to you guys.
Window("regexpwndclass:=Chrome_WidgetWin_1","regexpwndtitle:= Microsoft Edge").Activate
Set x = createobject("wscript.shell")
x.SendKeys "{F6}"
wait 1
x.SendKeys "{RIGHT}"
x.SendKeys "{RIGHT}"
x.SendKeys "{ENTER}"
With this focus is coming on 'Save As' button and using enter i am able to click on it.
thanks

Related

Handle Webpage dialog box in selenium

I am automating an web application through selenium, in that application on click of Search button a web page dialog box appears.
This dialog box is not identified by developer tool, developer tools still identifies parent window.
Driver.getwindowhandles is returning count of 1, which looks like the dialogbox is not a child window.
Tried Alert, frames, iframes but none them has identifed this dialog box.
Also this popup is not a window pop up.
Can someone please suggest how to handle this kind of webpage dialog box.
This is a nightly job, so i cannot use Robot class , AutoIT or sikuli because these require an active window session.

Opening Internet Explorer 100% Hidden

I have a ClickOnce application and I want to create an exe that autoruns the weblink using Internet Explorer. I would like it to run seamless and professionally such that no pop-ups etc. appear.
I have created a batch file that runs a VBS file, which launches Internet Explorer and runs the link, the Internet explorer window is hidden, but the icon for Internet explorer still appears on the task bar.
This is the code used to launch Internet Explorer:
Dim ie
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = False
ie.Navigate "https://google.com"
To give you an example of what I'm trying to achieve, the following application https://www.jitbit.com/bat-to-exe/
Manages to run a clickonce application seamlessly without any taskbar icons showing Internet explorer, but I can't seem to reverse engineer its method
For anyone also wanting to open a ClickOnce weblink using a single exe
Create an application that runs the following CMD line:
C:\WINDOWS\system32>rundll32.exe dfshim.dll, ShOpenVerbApplication https://yourweblink
It is as simple as that.
This way, no browser is used at all.

how to auto-click a firefox pop-up notification

I want to auto click the "allow" action on a popup notification of firefox. But I don't know how to do it? Can someone help me about this?
Thanks
like a pop-up window sample, I want to automatically click "Share Location" action by script. I try to use Selenium, but I don't think selenium can do with this problem.
To enable pop up in firefox goto
Tools>>Contents>>
and then you will see the first option to be Block pop-up Window ,you can select it to block or deselect to enable pop-ups.

Crystal Reports Print issue in Firefox and Chrome

I have a crystal report,print Mode is set to ActiveX. When clicking on the Print button in crystal reports viewer using IE , the printer dialog appears properly. When using Firefox or Chrome it asking me to print to pdf. Is there any way to open the printer dialog with firefox and chrome?
Chrome removed the ability to disable print preview, but on Windows you can still disable it if you modify the application shortcut:
add --disable-print-preview to the end of the "Destination", so it read something like:
"C:\Users\MyUser\AppData\Local\Google\Chrome\Application\chrome.exe"
-- disable-print-preview
This will make CTRL+P default to the regular OS-specific print dialog. Ctrl+shift+P also works, for those who can remember the hotkey every time.

Any way to programmatically force IE8 to open popups in a new window instead of a tab?

Is there a way to programmatically instruct IE8 to open a popup in a new window rather than a new tab? I know that IE supports modal windows but I have a bunch of legacy code with ordinary popups.
Update:
I am using Javascript's window.open() method to create popup windows. However, when a user has their IE8 settings set to "Always open popups in a new tab", the popup is launched in a new tab rather than a new window.
Using html, the best you can do is set open page target to blank. Everything else is controlled by the client side and they can choose to open it in a new window or tab.
However, you can use javascript to open the window. Create Link to open in new window here
Since no one else is chiming in... After doing further research, it seems that you cannot force a pop-up to open into a new window when an IE8 user has the following browser setting enabled: Tools>>Internet Options>>Tabs>>When a pop-up is encountered:>>Always open pop-ups in a new tab.
Since I am in an Intranet environment, I have the option of locking down a users IE settings to either "Let Internet Explorer decide how pop-ups should open" or "Always open pop-ups in a new window".
I don't really care to exercise the above option so in order to get the desired user experience, I will resort to making one of the following code changes:
Convert existing pop-ups to IE specific Modal Dialogs using the showModalDialog() method.
Convert existing pop-ups to Javascript Modal Dialogs using jqModal or some other jQuery plug-in.
If you opt to let Internet Explorer decide how to display pop-ups, it
will display the pop-up in a new window if the pop-up specifies size
or display requirements. Otherwise, the pop-up is displayed in a new
tab.
http://windows.microsoft.com/en-US/windows-vista/Tabbed-browsing-in-Internet-Explorer-8-frequently-asked-questions
So if you don't set any specific window requirements and it should open in a new tab, unless a user has changed these settings.

Resources