Selenium leaves control after clicking to file explorer Browse button in MS Edge - selenium

Selenium leaves control after clicking to file explorer Browse button in MS Edge. This works fine in Chrome and Firefox but absolutely blocking to run next step in the code. I tried code via all possible ways and below code works to click to Browse button but after this step selenium leaves control because file explorer window opens. Is this Selenium or MS Edge driver issue?
Steps:
1. Open ajax web application through MS Edge (works)
2. Click to browse button through web driver core or java script method (works)
3. Selenium gone, leaves control till we close file explorer button (doesn't work) - this works fine in GC and FF.
4 (Blocked). Send key to type file name or implement AutoIt script (works)
5 (Blocked). Click to open button via AutoIt script (works)
6 (Blocked). File attached fine (works)
Working code:
driver.findElement(By.id("browseID")).click();
AND
WebElement we = null;
((JavascriptExecutor)ClientSessionFactory.session().webDriver()).executeScript("document.getElementsByName('browseName')[0].click()", we);
Environment:
Selenium version - Latest 3.6.0
Browser - MS Edge
MS Edge Driver - Latest Release 15063
Application type - Ajax web
This is actually blocking attachment functionality and it would be great if selenium will fix this. So far i just see Autoit is the solution as a 3rd party software but it is very tedious to add separate scripts for every browse buttons in the application, any code by selenium blocks due to OS dialog appearance.

I encountered the same problem. One solution can be to manipulate the "browse" window using an Auto-It script (for example). Right before click on the "browse" button, execute the Auto-It script and set a "sleep" command in the beginning to wait for 1-2 seconds. Now you can click on "browse" button. Works fine for me.

Same issue. To fix it i pimped the AutoIt script using WinWaitActive() as a first directive to wait til window is active.
I run the script in a parallel process (subprocess.Popen in python) just before opening the file upload

Related

"Make a Call From" Prompt is not displayed when running from automation - Chrome Selenium

thanks in advance.. I get the below prompt when I click on element with url:tel when I open the browser manually
But when I click the same from automation using selenium, I get this prompt. How do I get the prompt that is shown manually.

QTP has stopped recording and spying

I've been working for few months with QTP (UFT One 15.0.2), and today it has stopped recording (when I do the actions no lines are written in the script and no objects are added to the objects repository) and recognizing objects with the spy feature.
I am using the WEB add-in, and as I've been working for months with Mozilla Firefox I have checked that the WebExtension.xpi is well added to the browser.
I've tried to open mozilla before and after UFT One, I've also restarted my computer, I've checked the size of the screen browser is 100% and that in the Record and Run Settings the option " Record and run on any open browser" is checked for Web.
This situation usually occurs because the company's IT department has changed the related policy, causing the UFT Firefox extension to fail to run normally.
You can check if the HP.UFT.Firefox.NativeMessagingHost running in Windows task manager after openning Firefox while the extension is enabled, and check if the Micro Focus UFT Agent content script loaded in Firefox debugger's Sources tab(note: you need to check the "Enable browser chrome and add-on debugging toolboxes" in Web Developer Tools' Setting firstly).
If one of these things does not exist, you should check the policy change with your IT: did they block the related thing running?
If they all exist, you can open a CPE case to UFT One support. They will help you to do the further investigation.
I have checked that I had the same problem with chrome browser, so not an Extension problem.
Finally I have decided to uninstall and reinstall UFT One, but while uninstalling an error appeared and UFT persisted on the system.
After two trys I have launched UFT One and it has started working again.
I am not sure how long it will work.

Unable to click "Create an account" button on Firefox browser by robot framework

Unable to click "Create an account" button on firefox browser
(version:59.03 & 60, geckodriver-v0.20.0 & v0.20.1 for win64)
by robot framework on RIDE from link:
Code Like on RIDE
Open Browser http://automationpractice.com firefox
Click Link class=login
Wait Until Element Is Visible xpath://input[#name='back']/following-sibling::button[#name='SubmitCreate'] None None
Click Button xpath://input[#name='back']/followingsibling::button[#name='SubmitCreate']
XPath(//button[#type='submit' and #name='SubmitCreate']) is working and test cases is Pass. But the browser is not able to click on Create an account button.
More details may be seen from the link. I already passed 3 days did not get a solution. Could yoy please take a look.
Some browser version is unable to click some button action. After 3 days later, I got the solution. It works on Mozilla Firefox version 52 and Gecko driver version 0.18.0.Thanks to all.

Accept downloads automatically in Selenium WebDriver using IEDriver

How I can accept downloads in Selenium using InternetExplorerDriver.
Now when click to download file, Save As Dialog appears and then WebDriver stop the work.
I try to search a capability to set this how in ChromeDriver is just only add chromedriver.AddUserProfilePreference("download.prompt_for_download", false);
but I not found.
I need when driver click in button to download, the download automatically start and save in any folder.
Sorry my bad question. I'm new here.
I don't have windows machine so i couldn't check this but try following article. There is a registry which you need to modify to get such behavior. Let me know if it works.
https://jwcooney.com/2014/03/31/remove-internet-explorer-open-or-save-popup/
found another thread discussing the same thing
https://superuser.com/questions/246553/how-to-disable-file-download-popup-in-internet-explorer

Button is not clicked unless I click on it twice in Firefox, using selenium webdriver and C#

I have a button in a web application which I want to click. I am using Selenium WebDriver, C# and Firefox version 47.0.1.
I tried using explicit wait and also tried using Actions class. But nothing works.
It only works for firefox when I add the below code (click twice)
_NextButton.Click();
_NextButton.Click();
However, it works fine in Chrome browser with : _NextButton.Click();
and fails in chrome for the code used for executing on Firefox.
Kindly help me resolve this issue.
Sometimes their is some problems with IE11 and chrome in selenium is not able to work as expected. so I use double click instead of click in certain scenarios.
Actions action = new Actions(driver); action.moveToElement(driver.findElement(By...path..."))).doubleClick().perform();