Sunday, August 20, 2017

How to create your laptop a Wi-Fi hotspot in 2 simple clicks

How to create your laptop a Wi-Fi hotspot


Sometimes we are required to create Wi-Fi hotspot to share internet with our friends or someone else whom you know or not. So i listed few reasons for the same when we need Wi-Fi hotspot below :

1. If you want to provide an access to your Wi-Fi for a limited period of time and incase  you don't want to reveal /share your original password to your friend or strangers.



2. If you have laptop which is connected to some Wi-Fi whose password is not known to you and you want to connect your mobile to access Wi-Fi.

3. Incase you need to test some scenario with Fancy Wi-Fi Name or long Wi-Fi name or Unicode Wi-Fi name etc.

You can use the Baidu Wi-Fi hotspot software to resolve all the above points.

You can download and install the Baidu Wi-Fi hotspot software from : http://filehippo.com/download_baidu-wifi-hotspot/ 

Once its get installed , you can create  WiFi name and password of your choice .



** You can also use this software to send file or receive file from phone.

You can watch Youtube video (in Hindi though but can be easily understandable)  for demo




Thanks,
QA Humor

Sunday, July 23, 2017

Shortcuts to open Microsoft Office Apps

Shortcuts to open Microsoft Office Apps


Many of the times we have lots of apps in our system and its very hard to search and launch/open these apps even though we have the advance facility now provided by Microsoft for searching Apps but opening it from shortcuts is a faster way and comes handy if we now these shortcuts. Here are the most frequently apps which we use on daily basis.

Open Run command prompt by pressing Windows Key   
    + R . Type these shortcuts

Microsoft Apps                           shortcuts
 1 . MS Word                 -                 winword                                                                                   
2. MS Powerpoint      -                 powerpnt
3. MS Excel                   -                 excel

4. MS Outlook             -                 outlook
5. MS Onenote            -                 onenote




You can also watch video below :




Saturday, January 14, 2017

How to take backup of database and restore using command

How to take backup of database and restore using command


I was involved in working on databases using MySQL and recently i was required to re-create DB on different machine. So either you can create it from scratch or take the backup of DB from one machine and restore it on other machine which saves time. Also its a practice to take backup on regular basis.
To to this we can use below command.


To take DB backup
=============================================
-> mysqldump database_name > database_name.sql

**Make sure to keep the db name same.



To Restore DB backup
=============================================
->mysql database_name < database_name.sql


You will have the DB ready on new Box/machine in few minutes with same replica.


That's it.


How to upgrade JAVA version in AWS Linux instance

How to upgrade JAVA version in AWS Linux instance


On AWS EC2 instance(Linux) if you ever want to upgrade JAVA version to latest ,you can do it using following command.

Once the instance (EC2 linux) is up and running , connect remotely and logged in.

1. Check the version of JAVA using :
 -> java -version

2. Uninstall the Older version using : [in my case its java-1.7.0-openjdk ]
-> sudo yum remove java-1.7.0-openjdk

3. Install the Newer version of JAVA using :
-> sudo yum install java-1.8.0


To make sure its installed correctly - check the version again using command given in Step1 above.


Thats it...

Sunday, August 28, 2016

Appium : How to start Appium server using command line

How to start Appium server using command line 


This is very common scenario where you will be needed to trigger/start Appium server either using command line or trigger through .bat file in automation.
I will explain here step by step how to do this and creating a .bat file in the end.

*** You can download batch file from here “appiumserver”(see explanation below)

To do this, please follow the below steps:

 Step 1: Make sure you have Node installed (if not, download it fromlink )  and would be good if
              you configured in your path variable, such that you can run node  from anywhere in your pc
              .It will be helpful in your automation.

Type node in command prompt, you will see like below screenshot (if it configured properly)
C :\> node        


 Step 2: Make sure you have Appium server is installed.

 Step 3: Open Command Prompt and navigate to Appium folder till below path(based on your
              machine ,path may change)
C:\Program Files (x86)\Appium\node_modules



 Step 4: Now run below command, with Appium server argument which you think to be part of it, I
              have passed minimum argument, based on your requirement you can add more.

 -> node appium --address 127.0.0.1 --port 4725 --platform-name Android --platform-version 19 --automation-name Appium



You can see Appium started at port 4725 , 



You can also verify one step ahead by hitting the below URL in your browser
http://127.0.0.1:4725/wd/hub/status 




Step 5:  Creating a batch file, this will make your life little easier in setup and running Appium script.
              Open notepad and paste below code and save it as "appiumserver.bat"
REM ############################################################################ 
REM ## START

echo "navigating to Appium folder"
REM ## change the folder path , based on your machine
cd /D C:/Appium/Appium/node_modules
node appium --address 127.0.0.1 --port 4725 --platform-name Android --platform-version 19 --automation-name Appium

REM ##END
REM############################################################################

You can download it from here “appiumserver”

Comment down below for any questions.



Monday, June 13, 2016

Automation : How to map network drive and save file to a shared location using AutoIT and Powershell.


 This is a sample script which lets you map your network share to your windows 
 machine/system. 
 This can be used/helpful in your scripting where you want to save your results 
 in a shared folder once you are done with test execution.

 - Tools used here is AutoIT , which helps in triggering powershell commands on 
   windows machine and opens notepad and save it to network share.
 - Benefit of using AutoIT is that you can create .exe file and can be run/trigger 
   from remote using .bat file etc. 

;#----------------------------------------------------------------------------  
;## Script Function:
;## To map network drive and open Notepad and save file to a shared location.

;##@author : P programs
;##----------------------------------------------------------------------------

Run("powershell.exe")
Sleep(1000)

;send("net use : \\\shared_folder_name  /User:")
send("net use o: \\10.20.30.40\results secretPassword /User:userdemo1")

Send("{ENTER}")
Send("exit")
Send("{ENTER}")
;WinClose("powershell.exe")
sleep(1000)
Run("notepad.exe")
$handle = WinWaitActive("[CLASS:Notepad]","")
WinSetState("[CLASS:Notepad]","",@SW_MAXIMIZE)
sleep(160000)
Send("Hello there")
WinClose($handle)
$handle = WinGetHandle("[ACTIVE]")
ControlClick($handle,"","[CLASS:Button; INSTANCE:1]")
$handle = WinWaitActive("[CLASS:#32770]","")
$hw = WinGetHandle("[ACTIVE]")
ControlSetText($hw, "", "ComboBox1", "O:\results")
ControlSend($hw,"","ComboBox3","UTF-8")
;sleep(2000)
ControlClick($hw,"","[CLASS:Button; INSTANCE:1]") ;to click on the button



Reference links: http://ss64.com/nt/net_share.html
                 http://ss64.com/nt/net_use.html



Wednesday, January 13, 2016

Appium : How to get the activity name of android application

How to get the activity name of android application


For mobile app automation, Appium requires app activity name (usually the first screen of your app when you tap on app to launch it ) in desired capabilities parameter . To get the app activity name which Appium can use while launching an app. here are the ways you can use to get the same  

Step 1 : using the aapt command.

To get the aapt.exe , you have to navigate to android sdk folder then build-tools and goto some api version . for example(specific to my machine) 
E:\Android\adt\sdk\build-tools\android-4.4W 

open command prompt and run the below command 
- aapt dump badging

for example : Let's take whatsapp application
- aapt dump badging E:\com.whatsapp.apk

output :
You can get the package name and launchable-activity with other details as highlighted in below :





























Step 2: using Appium UI console


Sunday, December 27, 2015

Appium : Step by step Native IOS App Automation - Part 3(iOS Simulator)

In this Part 3 , we are talking about iOS Simulator command line commands.

How this will be helpful in automation:
This will helpful in checking/verifying your iOS app whether it’s working fine without Appium or any other automation tool in picture. Once you find your app works well then you can go for automation with Appium, this is just to save your time from unnecessary troubleshooting.

Here we start with some useful and important commands

1. To get the list of Simulators available in your system , you can type below command
-> Open Terminal and type below command
                        $ xcrun instruments -s

2. To launch Simulator using command line , you can type below command and provide same of simulator as you got from step 1 above
-> Open Terminal and type below command
$ xcrun instruments -w "iPhone 6 (9.2)”   // replace with your Simulator name

3. To install app on Simulator using command line once Simulator is up and running, you can type below command
-> Open Terminal and type below command
                        $ xcrun simctl install booted <app path>
                  e.g $ xcrun simctl install booted /Users/macuser/Desktop/UIKitCatalog.app

4. To launch an installed app on your simulator , type below command(you can also click/tap the app and launch in simulator using mouse )
-> Open Terminal and type below command
                        $ xcrun simctl launch booted <app identifier>  

// To get an app identifier or Bundle Identifier you can get it from info.plist file
     e.g $ xcrun simctl launch booted com.example.apple-samplecode.UIKitCatalog


if you are interested to learn more about all available subcommands you can get by running
          $ xcrun simctl

Hope this helps to get acquainted yourself with basic as well as important iOS simulator commands.click here for Part 2

In Part 4 , we will see the sample demo program of iOS Native App automation using Appium. Stay tuned.


Linux: How to change OS language via terminal?

  In this post , I will be talking about how to change language of Linux OS from Terminal . If you are not a frequent user of Linux and str...