Reputation: 1691
I need to run my test scenarios on localhost as the following URL.
localhost:8080
Can anybody help me to do that? Thanks in advance.
Upvotes: 4
Views: 19812
Reputation: 513
127.0.0.1 is a by default address of our system. It can work as a domain name also. And you can replace "localhost" to "127.0.0.1".
So, on behalf of website url you can use URL: "http://127.0.0.1:8080/" in your project.
Upvotes: 0
Reputation: 496
this should work assuming 8080 is the right port...
(the the default is usually localhost:4444)
mind that the need the appropriate capabilities.
import java.net.URL;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
DesiredCapabilities capability = DesiredCapabilities.internetExplorer();
driver = new RemoteWebDriver(new URL("http://127.0.0.1:8080/wd/hub"), capability);
Upvotes: 2