I tried to run below selenium script and not able to open chrome browser to run the all listed operations:
package automationFramework;
import org.openqa.selenium.chrome.ChromeDriver;
import appModule.Add_Cart;
public class Test {
public static ChromeDriver driver= null;
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
String exepath= "C:\\SamtaSelenium\\Chromedriver\\chromedriver.exe";
System.setProperty("webdriver.chrome.driver", exepath);
System.setProperty("java.net.preferIPv4Stack" , "true");
driver= new ChromeDriver();
driver.get("
http://automationpractice.com/index.php");
Thread.sleep(5000);
// Maximize the Browser Window
driver.manage().window().maximize();
//Add item in the cart
Add_Cart.Mouse_Hover(driver);
//SignIn_Action.Login(driver);
Thread.sleep(300);
}
}
When I Run above script then getting below output in the console. after internet surfing, I have added command System.setProperty("java.net.preferIPv4Stack" , "true"); as requested on internet and after that also i am getting same result.
lo
address.getHostName() = 127.0.0.1
address.getHostAddress() = 127.0.0.1
address.isLoopbackAddress() = true
address.getHostName() = 0:0:0:0:0:0:0:1
address.getHostAddress() = 0:0:0:0:0:0:0:1
address.isLoopbackAddress() = true
eth0
address.getHostName() = fe80:0:0:0:4593:d706:294d:eb47%eth0
address.getHostAddress() = fe80:0:0:0:4593:d706:294d:eb47%eth0
address.isLoopbackAddress() = false
eth1
wlan0
address.getHostName() = 192.168.1.5
address.getHostAddress() = 192.168.1.5
address.isLoopbackAddress() = false
address.getHostName() = fd14:5f94:8201:a200:9c:a119:5716:9d89
address.getHostAddress() = fd14:5f94:8201:a200:9c:a119:5716:9d89
address.isLoopbackAddress() = false
address.getHostName() = fd14:5f94:8201:a200:4104:f47d:cdae:6b0b
address.getHostAddress() = fd14:5f94:8201:a200:4104:f47d:cdae:6b0b
address.isLoopbackAddress() = false
address.getHostName() = fe80:0:0:0:9c:a119:5716:9d89%wlan0
address.getHostAddress() = fe80:0:0:0:9c:a119:5716:9d89%wlan0
address.isLoopbackAddress() = false
net0
address.getHostName() = fe80:0:0:0:0:5efe:c0a8:105%net0
address.getHostAddress() = fe80:0:0:0:0:5efe:c0a8:105%net0
address.isLoopbackAddress() = false
net1
wlan1
address.getHostName() = fe80:0:0:0:6d0a:dcb8:612a:681d%wlan1
address.getHostAddress() = fe80:0:0:0:6d0a:dcb8:612a:681d%wlan1
address.isLoopbackAddress() = false
net2
eth2
eth3
eth4
wlan2
wlan3
wlan4
wlan5
wlan6
wlan7
wlan8
wlan9
wlan10
Loopback interface LO:
lo
address.getHostName() = 127.0.0.1
address.getHostAddress() = 127.0.0.1
address.isLoopbackAddress() = true
address.getHostName() = 0:0:0:0:0:0:0:1
address.getHostAddress() = 0:0:0:0:0:0:0:1
address.isLoopbackAddress() = true
Please suggest me that how can I fix this issue? I am running this for Chrome browser.