Showing posts with label misc. Show all posts
Showing posts with label misc. Show all posts

Wednesday, August 20, 2014

BASIC HTML FOR TESTING SELENIUM - SOURCE CODE

 BASIC HTML FOR TESTING SELENIUM - SOURCE CODE

app link -
http://catchbug.blogspot.in/2014/08/basic-html.html




<!—This is a comment  -   ref http://www.ironspider.ca/basic_html/structure.htm-->
<html>
<head>
               <title> My Home Page </title>
</head>
<body>
               HELLO WORLD!
<br>
<br>
               EDIT FIELD
               <input type="text" name="firstname">
<br>
<br>
               CHECKBOX
               My favourite colors are:<br><br>
               <input type="checkbox" name="color" value="red">Red<br>
               <input type="checkbox" name="color" value="yellow">Yellow<br>
<br>
<br>
               RADIO BUTTON
               Your current web browser is:<br><br>
               <input type="radio" name="browser" value="IE" checked>Internet Explorer<br>
               <input type="radio" name="browser" value="Mozilla">Mozilla<br>
<br>
<br>
               DROP DOWN
               I like my coffee:<br><br>
               <select name="coffee">
               <option value="black">Black</option>
               <option value="cream" selected>With cream</option>
<br>
<br>
               BUTTON
               <input type="submit" value="Submit Information">
<br>
<br>
               TABLE
<table border="5">
   <tr>     <td>Row 1, Cell 1</td>                    <td>Row 1, Cell 2</td>     </tr>
   <tr>     <td>Row 2, Cell 1</td>                    <td>Row 2, Cell 2</td>     </tr>
</table>
</body>
</html>


Basic html

My Home Page 1. Text Data :

2. EDIT FIELD :

3. CHECKBOX : My favourite colors are:

Red
Yellow


4. RADIO BUTTON : Your current web browser is:

Internet Explorer
Mozilla


5. DROP DOWN : I like my coffee:



7. TABLE :
Row 1, Cell 1 Row 1, Cell 2
Row 2, Cell 1 Row 2, Cell 2

Tuesday, September 17, 2013

misc : What is RWD


RWD

What is Responsive Web Design?

 

 A responsive website changes its appearance and layout based on the size of the screen the website is displayed on.






 

 Responsive sites can be designed to make the text on the page larger and easier to read on smaller screens. They can also be configured to make the buttons on the phone's screen easier to press.


Misc : What is BootStrap

Boot Strap

" it's a simple file that starts a large process."

 

"Rather than the user downloading the entire app, including features he does not need, and re-downloading and manually updating it whenever there is an update, the user only downloads and starts a small "bootstrap" executable, which in turn downloads and installs those parts of the application that the user needs. Additionally, the bootstrap component is able to look for updates and install them each time it is started."

 


"...is a technique by which a simple computer program activates a more complicated system of programs."

 

"A different use of the term bootstrapping is to use a compiler to compile itself, by first writing a small part of a compiler of a new programming language in an existing language to compile more programs of the new compiler written in the new language." 

 

What is Twitter Boot-strap ?

http://wearepropeople.com/blog/twitter-bootstrap-the-ultimate-resources-roundup

http://www.w3resource.com/twitter-bootstrap/tutorial.php

 

Monday, May 20, 2013

Restart Remote machine from another machine in the network

Restart Remote machine from another machine in the network



Pre-Req :
  1. You need to have admin access to restart the victime machine .
  2. Its better if  machine under operation and victim are in the same network

First Ping the machine if its operating

  1. Goto Start>Run > Type cmd
  2. Type  "ping ip address" or "ping computer_name"  .Eg:  ping vx32Dev99
  3. See whether you notice any reply statements .  
To restart the Machine
  1. Goto Start>Run > Type cmd
  2. type "shutdown -i"
  3. Click on Browse and select the computer > Click on Add
  4. Select Restart
  5. Write any comment .
  6. Click on Ok
  7. If operation is success - You'll see message "Succeeded machine_name" . If Failed you'll see "Failed"

Monday, January 14, 2013

Keeping Remote Desktop or Physical machine Active

How to keep Remote Desktop or Physical machine active ,without using any 3rd party tools ?

If you are having only limited access to the computer say in your office it is always best to use 3rd party tool mouse or keyboard simulator which does not require any installation to keep the system active.In many cases , due to some policy even 3rd party tool might be restricted during that case you might have write your own script to keep the machine alive.
Below is a small script which keeps the system active i.e., prevent system from logging off by sending keystrokes (caps key in our case).

Dim i
set oWscript=createobject("Wscript.Shell")
i=0
do until i=1
 oWscript.sendkeys "%({NUMLOCK})"
 Wscript.Sleep 1000
 loop

  1. Copy the ablove piece of code in a notepad file and save it as ".vbs"
  2. Once double clicked you can see your NUMLOCK LED light in our keyboard going ON and OFF with a gap of 1sec.
  3. To kill this process open Task manager and kill process "wscript"

Keeping 2 Remote Desktops active

How to keep 2 or more Remote Desktops active ?

When you have 2 machines say 1 for execution ( i.e., running automation scripts and the other to do day to day activity) or you might have access to run automation scripts in few machines , then there is a need to keep all the machine active.

Below is the piece of code which can help you achieve this .

Dim i,sW_count,iTime_delay
set oShell =createobject("Wscript.Shell")
i=0
sW_count=Inputbox("Enter number of windows")
Redim Window_Name(sW_count-1)

For iCount=0 to sW_count-1
 Window_Name(iCount)=inputbox("enter exact name as found in the Title box the window")
Next

iTime_delay=Inputbox("Enter time before next trigger in seconds")   iTime_delay=iTime_delay*1000
For iCount=0 to sW_count-1
 WScript.Sleep(500)
 oShell.AppActivate(Window_Name(iCount))
 WScript.Sleep(500)
 oShell.SendKeys "% x"   'to maximize the window
next

do until i=1
 for iCount=0 to sW_count-1
  oShell.AppActivate(Window_Name(iCount))
  WScript.Sleep(iTime_delay)     
 next 
loop


How to use :
  1.  Copy this piece of code in a text file and save it with an extension as ".vbs".
  2. Double click on the file.
  3. Enter how many windows you wish to keep alive.
  4. Enter the exact names of all the windows as on the title bar of the window E.g:CATCHBUG.blogspot.com - Windows Internet Explorer
  5. Enter after how many seconds you wish to trigger the window in seconds Eg: 120   (This will trigger each window after 120 seconds )
  6. To close this script open task manager kill the "wscript" process. 
Note :
  1. This script should be used in conjunction with any key stroke or mouse simulation tool.
  2. This works only on windows platform.

Prevent Logging off of Remote Desktops

 How to prevent Remote Desktops and physical machine from logging off     

The problem with Remote machines when accessed through citrix is that it tends to log off if the machine is unattended for sometime . As per my research there a few ways to prevent the machine from logging off but the one which I found very convenient was with the use of  a tool called MouseMove .

MouseMove
This application sends mouse simulation at stipulated time interval to prevent the system from logging off. Inorder for the whole procedure to work the mouse simluation should be target towards the remote machine by doing this 2 things can be achieved
  1. Prevents the physical machine from Logging off ( This happens anyways as any mouse activity keeps the physical machine alive )
  2. Prevents the remote machine from loggin off if targeted properly.
Another cool feature is that you can choose the application on which the mouse stimulation can take effect.

Finally this tool is tailored for applications which uses hotkeys during automation run and batch runs.As this tool does not use any keys unless configured at the beginning.Follow the link http://movemouse.codeplex.com/ to download the application and the best part is it is FREE !!