I am using WebDriver (Selenium2) with Java on linux. I use WebDriver to automatically fill out a form and submit it. I ran into a problem with htaccess sites, i.e. I cannot access the htaccess site through WebDriver.
Can anyone help me in this regard?
Thanks in advance, Sunil
From Selenium Frequently Asked Questions (which is currently out):
How to use Selenium to log in to sites that require basic HTTP authentication (where the browser makes a modal dialog with a request for credentials)?URL-, RFC 1738:open http://myusername:myuserpassword@myexample.com/blah/blah/blah, Internet Explorer , Microsoft / URL- IE. , , KB. "iexplore.exe" DWORD 0 HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE., Selenium Remote Control, 0.9.2.
How to use Selenium to log in to sites that require basic HTTP authentication (where the browser makes a modal dialog with a request for credentials)?
URL-, RFC 1738:open http://myusername:myuserpassword@myexample.com/blah/blah/blah
, Internet Explorer , Microsoft / URL- IE. , , KB. "iexplore.exe" DWORD 0 HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE.
, Selenium Remote Control, 0.9.2.
WebDriver HTTP-. , http://code.google.com/p/selenium/issues/detail?id=34
WebDriver ( Selenium) Windows GUI, GUI HTTP. , , , Google , "Selenium AutoIt" ..
- AutoIt Sikuli - .
Selenium - FireFox , , , Selenium .
" " my.domain.com " " myuser "
- , , . ( ) network.http.phishy-userpass-length; 255
, .. Selenium 2
, .
public void login(String username, String password){ WebDriver driver = getDriver(); String URL = "http://" + username + ":" + password + "@" + "link"; driver.get(URL); driver.manage().window().maximize(); }
Source: https://habr.com/ru/post/1728897/More articles:What C ++ cross-platform platform GUI infrastructure has good skinning ability? - c ++What am I doing wrong in this simple closure - javascriptGoogle Wave Link - google-waveBest tool for collecting Java process statistics and JMAP explanations - javajavascript remove object - javascriptHow to create an array of cells in Matlab from this data type - matlabhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1728899/should-a-websites-images-folder-and-images-be-stored-in-svn-repository&usg=ALkJrhhNJ_wVJJdLrpz1RYKsQGBIOAGjywASP.NET/Silverlight USB Management Device - asp.netCheck Flags Loaded From JQuery Download - jqueryHow to avoid calling ajax method more than once? - jqueryAll Articles