How to Install iOS App without USB Cable with the help of same wifi

 How to Install iOS App without USB Cable with the help of same wifi 
1)For first time need to Connect Device via USB cable
2)Start XCode ->Window->Devices and Simulators
3)Select/click on our device which is visible at left side
4)Then Tick the option connect via wifi
5)Device will be connected via same wifi . Next time no need to connect with USB Cable


How to Install Android App without USB Cable with the help of same wifi

 How to Install Android App without USB Cable with the help of same wifi 
1)For first time need to Connect Device via USB cable
2)Start ADB Server ex adb start-server
3)Find Connected devices ex adb devices
4)Run following command "adb tcpip 5555" and wait till complete processing 
5)Run "adb shell netcfg" Then find out IP address of device ex. 192.168.0.123
6)Then Run "adb connect 192.168.0.123:5555".
8)Device will be connected via same wifi . Next time no need to connect with USB Cable


We can connect the same device with multiple computers using the same Port Number
Also, We can connect multiple devices with a single computer

C:\>adb connect 192.168.0.128:6666   //Device 1
C:\>adb connect 192.168.0.115:7777    //Device 2

The above two devices will get into Android Studio

How to set up Selenium Grid envirnoment

 Selenium Grid Configuration

Launch Hub
java -jar selenium-server-standalone-3.141.59.jar -role hub

Register Node
java -jar selenium-server-standalone-3.141.59.jar -role webdriver 
-hub http://192.168.0.114:4444/grid/register -port 5556

Register Node with specific browser
java -jar selenium-server-standalone-3.141.59.jar -role webdriver 
-hub http://192.168.0.114:4444/grid/register -port 5556 -browser browserName=firefox

Register Node with multiple browsers
java -jar selenium-server-standalone-3.141.59.jar -role webdriver 
-hub http://192.168.0.114:4444/grid/register -port 5556 -browser browserName=firefox  -browser browserName=chrome

Register Node with multiple browser and IE
java -jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://192.168.0.114:4444/grid/register 
-port 5556 -browser browserName=iexplore  -browser browserName=chrome

Register Node with multiple instance of same browser
java -jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://192.168.0.114:4444/grid/register 
-port 5556 -browser browserName=iexplore  -browser browserName=chrome  -browser browserName=firefox 
-browser browserName=firefox

Register Node with multiple instances of same browser
java -jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://192.168.0.114:4444/grid/register 
-port 5556 -browser browserName=firefox,maxInstances=4

Register Node with multiple instances of different browsers 
java -jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://192.168.0.114:4444/grid/register 
-port 5556 -browser browserName=firefox,maxInstances=4 -browser browserName=chrome,maxInstances=3 
-browser browserName=iexplore,maxInstances=2

To set session
java -jar selenium-server-standalone-3.141.59.jar -role hub -maxSession 10

We can start two node in same machine 
Run two times cmd and register nodes
cmd1
java -jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://192.168.0.114:4444/grid/register 
-port 5556 -browser browserName=firefox,maxInstances=4 -browser browserName=chrome,maxInstances=3 
-browser browserName=iexplore,maxInstances=2
cmd2  Just change Port Name
java -jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://192.168.0.114:4444/grid/register 
-port 5557 -browser browserName=firefox,maxInstances=2 -browser browserName=chrome,maxInstances=6 
-browser browserName=iexplore,maxInstances=8

Selenium Node : Configure drivers

Chrome
java -Dwebdriver.chrome.driver=C:\Webdrivers\chromedriver.exe -jar selenium-server-standalone-3.141.59.jar 
-role webdriver -hub http://192.168.0.114:4444/grid/register -port 5556 -browser browserName=chrome

Chrome+ie
java -Dwebdriver.chrome.driver=C:\Webdrivers\chromedriver.exe -Dwebdriver.ie.driver=C:\Webdrivers\IEDriverServer.exe 
-jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://192.168.0.114:4444/grid/register 
-port 5556 -browser browserName=chrome -browser browserName=iexplore

Chrome+ie+Edge
java -Dwebdriver.chrome.driver=C:\Webdrivers\chromedriver.exe 
-Dwebdriver.ie.driver=C:\Webdrivers\IEDriverServer.exe 
-Dwebdriver.edge.driver=C:\Webdrivers\MicrosoftWebDriver.exe -jar selenium-server-standalone-3.141.59.jar 
-role webdriver -hub http://192.168.0.114:4444/grid/register -port 5556 -browser browserName=chrome 
-browser browserName=iexplore -browser browserName=edge

Chrome+ie+Edge+Firefox
java -Dwebdriver.chrome.driver=C:\Webdrivers\chromedriver.exe 
-Dwebdriver.ie.driver=C:\Webdrivers\IEDriverServer.exe 
-Dwebdriver.edge.driver=C:\Webdrivers\MicrosoftWebDriver.exe -Dwebdriver.firefox.driver=C:\Webdrivers\geckodriver.exe 
-jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://192.168.0.114:4444/grid/register 
-port 5556 -browser browserName=chrome -browser browserName=iexplore -browser browserName=edge -browser browserName=firefox


How to create Maven Project
Install Maven
1)Download Maven  "http://maven.apache.org/download.cgi"
"apache-maven-3.6.0-bin.zip" file and extract it
2)Keep Extracted folder in C drive
3)Set Envirnoment varibles MAVEN_HOME  with directory path  ex "C:\apache-maven-3.3.9"and Path variable ex "%M2_HOME%\bin"
4)Checl Maven installed properly or not 
cmd->mvn -version

Create Project in Eclipse
1)File->New->Other->Maven-)click on maven project->next->next->provide group id 
ex "DemoProject" and artifact id ex "demo" then click on finish
2)Maven project will be created
3)Add all dependancies into POM.xml file 
To check "https://mvnrepository.com/artifact/org.testng/testng/6.14.3" and search dependency 
ex. selenium java and copy paste maven code into pom.xml file
ex. 

    org.testng
    testng
    6.14.3
    test



Use of Maven :- No need to main jar files