--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/h9QvTCt7Pm8J.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
--
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
--
Jayakumar
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
@Sanam,
Handling of such 'HTTP Basic Authentication' dialogs are not yet supported by webdriver. Hence, driver.switchTo() and the below mentioned link won't be helpful.
You still need AutoIt to bypass the dialog.
(OR)
You might consider trying out the tricks like, passing the username and password in the URL itself, editing the windows registry(for IE).
(Hint: Search on Google / this group )
On 14 March 2012 12:32, Jayaraman - Inspired to become Software Architect <electri...@gmail.com> wrote:
Yes you can..Pls have a look on this-Jay!!
On Wed, Mar 14, 2012 at 12:05 PM, sanam <sanam...@qualitiasoft.com> wrote:
Hi,I have handled the Windows Authentication Dialog in Selenium RC using AutoIT and it works fine for the browsers IE,FF and chrome.However I am trying to achieve this using Webdriver.How can this be done? is there a function like driver.switchTo().prompt and then we can enter the user id and password ??--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/h9QvTCt7Pm8J.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
--
Jayakumar
@Sanam,
Handling of such 'HTTP Basic Authentication' dialogs are not yet supported by webdriver. Hence, driver.switchTo() and the below mentioned link won't be helpful.
You still need AutoIt to bypass the dialog.
(OR)
You might consider trying out the tricks like, passing the username and password in the URL itself, editing the windows registry(for IE).
(Hint: Search on Google / this group )
On 14 March 2012 12:32, Jayaraman - Inspired to become Software Architect <electri...@gmail.com> wrote:
Yes you can..Pls have a look on this-Jay!!
On Wed, Mar 14, 2012 at 12:05 PM, sanam <sanam...@qualitiasoft.com> wrote:
Hi,I have handled the Windows Authentication Dialog in Selenium RC using AutoIT and it works fine for the browsers IE,FF and chrome.However I am trying to achieve this using Webdriver.How can this be done? is there a function like driver.switchTo().prompt and then we can enter the user id and password ??--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/h9QvTCt7Pm8J.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
--
Jayakumar
Hi Karthik,
I am not able to handle authentication required pop up window by using webdriver.
request you to pls share a sample code.
Thanks,
Seema
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
--
Jayakumar
On Wednesday, March 14, 2012 7:57:17 AM UTC, Jayakumar C wrote:
@Sanam,
Handling of such 'HTTP Basic Authentication' dialogs are not yet supported by webdriver. Hence, driver.switchTo() and the below mentioned link won't be helpful.
You still need AutoIt to bypass the dialog.
(OR)
You might consider trying out the tricks like, passing the username and password in the URL itself, editing the windows registry(for IE).
(Hint: Search on Google / this group )
On 14 March 2012 12:32, Jayaraman - Inspired to become Software Architect <electri...@gmail.com> wrote:
Yes you can..Pls have a look on this-Jay!!
On Wed, Mar 14, 2012 at 12:05 PM, sanam <sanam...@qualitiasoft.com> wrote:
Hi,I have handled the Windows Authentication Dialog in Selenium RC using AutoIT and it works fine for the browsers IE,FF and chrome.However I am trying to achieve this using Webdriver.How can this be done? is there a function like driver.switchTo().prompt and then we can enter the user id and password ??--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/h9QvTCt7Pm8J.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
--
Jayakumar
//...
//Note: this logic works in Chrome and Firefox. It did not work in IE and I did not try Safari.
//...
//import relevant packages here
public class TestDemo {
static WebDriver driver;
public static void main(Strings{} args) {
//setup web driver
System.setProperty("webdriver.chrome.driver", "path to your chromedriver.exe");
driver = new ChromeDriver();
//create new thread for interaction with windows authentication window
(new Thread(new LoginWindow())).start();
//open your url. this will prompt you for windows authentication
driver.get("your url");
//add test scripts below ...
driver.findElement(By.linkText("Home")).click();
//.....
//.....
//.....
//.....
}
//inner class for Login thread
public class LoginWindow implements Runnable {
@Override
public void run() {
try {
login();
} catch (Exception ex) {
System.out.println("Error in Login Thread: " + ex.getMessage());
}
}
public void login() throws Exception {
//wait - increase this wait period if required
Thread.sleep(5000);
//create robot for keyboard operations
Robot rb = new Robot();
//Enter user name by ctrl-v
StringSelection username = new StringSelection("username");
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(username, null);
rb.keyPress(KeyEvent.VK_CONTROL);
rb.keyPress(KeyEvent.VK_V);
rb.keyRelease(KeyEvent.VK_V);
rb.keyRelease(KeyEvent.VK_CONTROL);
//tab to password entry field
rb.keyPress(KeyEvent.VK_TAB);
rb.keyRelease(KeyEvent.VK_TAB);
Thread.sleep(2000);
//Enter password by ctrl-v
StringSelection pwd = new StringSelection("password");
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(pwd, null);
rb.keyPress(KeyEvent.VK_CONTROL);
rb.keyPress(KeyEvent.VK_V);
rb.keyRelease(KeyEvent.VK_V);
rb.keyRelease(KeyEvent.VK_CONTROL);
//press enter
rb.keyPress(KeyEvent.VK_ENTER);
rb.keyRelease(KeyEvent.VK_ENTER);
//wait
Thread.sleep(5000);
}
}
}