When I am try to click the OK button, its showing me like OK clicked and the corresponding popover is not closing.Once that popover closed after OK button clicked, then only the data saved successfully. But here that pop is not closing once OK clicked. Manualy its working.
With what are you using watir, selenium?
better do a script from the automation motor. The below example is for watir with AutoIt (for IE)
au3 = WIN32OLE.new("AutoItX3.Control")
au3.WinWaitActive("Authentication Required")
au3.Send("Domanin/userName")
au3.Send("{TAB}")
au3.Send("Pass")
au3.Send("{ENTER}")
for selenium would be similar. See if this other SO answer works for you. Alert Handling + Java + webdriver
Related
I am writing tests using Geb. The browser I am using is Firefox. I want to click on a drop-down list that appears once the menu button is clicked. I can click on the menu button which gives me the drop-down list but I can't select the Item I want, Firefox just hangs. Chrome works just fine.
Here is my code :
container.menuButton.click() // this works fine. A list of appears.
container.menuOption("Coke").click() // the selection doesn't happen here it just hangs
How can I get Firefoxto work?
I'm writing an automated test against a Salesforce site. I'm using Firefox version 21.0 and Selenium version 2.33.0.
During the test, I have a couple of alerts to deal with (with one "okay" button) and do so successfully. The alerts behaves normally.
Later in the test, in a table, there is a delete link. When it is clicked, an alert appears saying "Are you sure?" with two options, OK and Cancel. Clicking OK should delete that row in the table.
But when I run the automated test, after clicking on the link, the alert very quickly flashes on and then disappears. The row has not been deleted. It is there and has a blue background (as it does when the mouse is hovered over the row). The popup disappearing is nothing to do with the code that follows clicking the link, as I have tried putting a big sleep in between and it still happens.
I am running the test in Firefox, could it be an issue with firefox? I tried running it in Chrome instead, but then the test keeps failing at an earlier point because it cant find an element which firefox can.
Below is the method I run to handle alerts. But I don't think the problem is to do with this, because it happens before this code is run. This method runs immediately after the clicking of the link...
private void acceptAlert() {
String mainWindow = webdriver.getWindowHandle();
WebDriverWait wait = new WebDriverWait(webdriver, 20);
wait.until(ExpectedConditions.alertIsPresent());
Alert alert = webdriver.switchTo().alert();
alert.accept();
webdriver.switchTo().window(mainWindow);
}
Hi I have a jquery function that closes when the user click on the close button in the div or hits enter. Its working fine in chrome. But in firefox, if I click anywhere on the html page and then hit enter its closing. Pls revert back soon with the solution. Thanks in advance.
I am testing the action of opening a PDF. In firefox I do not get a popup, but in selenium I get a save popup window. Is there a say to record this locator? or some other approach for selenium to click on that popup which only appears in Safari. I'm using Safari browser 5.0.5. Thanks!
Using the stock code found here: http://developers.facebook.com/docs/reference/javascript/FB.login/
FB.login is bound to a jquery click event on my button.
On Chrome it opens successfully in a popup.
On Firefox it opens in a new tab.
How do I get the popup back in Firefox?