Pages

Monday, May 19, 2014

How to use proxy Username and Password from Firefox in FirefoxDriver

http://seleniumworks.blogspot.com/2013/02/how-to-set-proxies-with-username-and.html

1. At the top of the Firefox window, click on the Firefox button and then select Exit
2. Press Win + R (click the Windows Start button and select Run... on Windows XP).
3. In the Run dialog box, type in:
    firefox.exe -p
4. Click OK.



5. Now, create the firefox profile "myProjectProfile".

If the Profile Manager window does not open, Firefox may have been running in the background, even though it was not visible. Close all instances of Firefox or restart the computer and then try again.

Add this New Firefox Profile on your code

ProfilesIni profile = new ProfilesIni();
FirefoxProfile myprofile = profile.getProfile("myProjectProfile");
WebDriver driver = new FirefoxDriver(myprofile);

Firefox configuration settings

This works fine without prompting any authentication when you do the following settings..

1) Type "about:config" on your FF url
2) Now type "Proxy" in the search field
3) Make sure "signon.autologin.proxy" is set "true" (By default it is "false")



Thursday, April 25, 2013

Systemctl

systemctl: used to introspect and control the state of the systemd system and service manager

Sysvinit CommandSystemd CommandNotes
service frobozz startsystemctl start frobozz.serviceUsed to start a service (not reboot persistent)
service frobozz stopsystemctl stop frobozz.serviceUsed to stop a service (not reboot persistent)
service frobozz restartsystemctl restart frobozz.serviceUsed to stop and then start a service
service frobozz reloadsystemctl reload frobozz.serviceWhen supported, reloads the config file without interrupting pending operations.
service frobozz condrestartsystemctl condrestart frobozz.serviceRestarts if the service is already running.
service frobozz statussystemctl status frobozz.serviceTells whether a service is currently running.
ls /etc/rc.d/init.d/systemctl list-unit-files --type=service (preferred)
ls /lib/systemd/system/*.service /etc/systemd/system/*.service
Used to list the services that can be started or stopped 
Used to list all the services and other units
chkconfig frobozz onsystemctl enable frobozz.serviceTurn the service on, for start at next boot, or other trigger.
chkconfig frobozz offsystemctl disable frobozz.serviceTurn the service off for the next reboot, or any other trigger.
chkconfig frobozzsystemctl is-enabled frobozz.serviceUsed to check whether a service is configured to start or not in the current environment.
chkconfig --listsystemctl list-unit-files --type=service(preferred)
ls /etc/systemd/system/*.wants/
Print a table of services that lists which runlevels each is configured on or off
chkconfig frobozz --listls /etc/systemd/system/*.wants/frobozz.serviceUsed to list what levels this service is configured on or off
chkconfig frobozz --addsystemctl daemon-reloadUsed when you create a new service file or modify any configuration

 

How to install and configure VNC Server on Fedora 18


Install:

$ yum -y install tigervnc-server

Configure:

$ vncpasswd

$ vncserver :1 -geometry 800×600 -depth 24

Starting applications specified in
/root/.vnc/xstartup

Monday, April 22, 2013

Fedora: yum through proxy


/etc/yum.conf

proxy=http://yourproxyip:port/
proxy_username=youruser
proxy_password=yourpassword

Friday, August 17, 2012

Recreating a missing virtual machine disk (VMDK) descriptor file

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002511

Overview Steps

To create a virtual machine disk descriptor file:
  1. Identify the size of the flat file in bytes.
  2. Create a new blank virtual disk that is the same size as the original. This serves as a baseline example that is modified in later steps.

    Note: This step is critical to assure proper disk geometry.
  3. Rename the descriptor file (also referred to as a header file) of the newly-created disk to match the name of the original virtual disk.
  4. Modify the contents of the renamed descriptor file to reference the flat file.
  5. Remove the leftover temporary flat file of the newly-created disk, as it is not required.
Note: This procedure will not work on virtual disks configured with a Para-virtualized SCSI controller in the virtual machine.

You can see video: http://www.youtube.com/watch?feature=player_embedded&v=tQmZOavolPY

java - No XML content. Please add a root view or layout to your document.

Во время сборки и запуска в eclipse нужно переключиться на окно с файлом java кода. Это довольно давнишняя проблема дружбы eclipse и android

During the build and run in eclipse should switch to a window with a file java code. This is a fairly long-standing problem of friendship eclipse and android.   

Friday, July 27, 2012

Troubleshooting Group Policy by Using Log Files

Because Userenv tracks the Group Policy engine and registry-based Group Policy, it is the most frequently used log file for Group Policy troubleshooting.

To use userenv.log || gpsvc.log ( %windir%\debug\usermode\UserEnv.log or gpsvc.log in W7 ) you need to first enable verbose logging.

To enable verbose logging
  1. Log onto the client computer as the administrator and run Regedit.
  2. Locate the following key: KEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon.
  3. Right click Winlogon, select New, and then click DWORD Value.
  4. Enter the following name for the DWORD Value: UserEnvDebugLevel.
  5. Enter 30002 (see description below) as the hexadecimal value. This writes the userenv into userenv.log, located in the \%windir%\debug\usermode directory.
  6. Run "gpupdate /force" to ensure a full listing of total Group Policy processing and restart the machine.

-------------------------------------------------

Use Registry Editor to add or to modify the following registry entry:
Subkey:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

Entry: UserEnvDebugLevel
Type: REG_DWORD
Value data: 10002 (Hexadecimal)
UserEnvDebugLevel can have the following values:
NONE 0x00000000
NORMAL 0x00000001
VERBOSE 0x00000002
LOGFILE 0x00010000
DEBUGGER 0x00020000
The default value is NORMAL|LOGFILE (0x00010001).

Note To disable logging, select NONE (0x00000000).

You can combine these values. For example, you can combine VERBOSE 0x00000002 and LOGFILE 0x00010000 to get 0x00010002. Therefore, if UserEnvDebugLevel is given a value of 0x00010002, LOGFILE and VERBOSE are both turned on. Combining these values is the same as using an OR statement.
0x00010000 OR 0x00000002 = 0x00010002
Note If you set UserEnvDebugLevel to 0x00030002, the most verbose details are logged in the Userenv.log file.

The log file is written to the %Systemroot%\Debug\UserMode\Userenv.log file. If the Userenv.log file is larger than 300 KB, the file is renamed Userenv.bak, and a new Userenv.log file is created. This action occurs when a user logs on locally or by using Terminal Services, and the Winlogon process starts. However, because the size check only occurs when a user logs on, the Userenv.log file may grow beyond the 300 KB limit.

Although the 300-KB limit cannot be modified, you can set the read-only attribute on the Userenv.bak file, and the Userenv.log file will grow indefinitely. You must only use this method temporarily, remove the read-only attribute on the Userenv.bak file as soon as you are finished troubleshooting.