package DDT;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;import org.openqa.selenium.WebDriver;import org.openqa.selenium.chrome.ChromeDriver;import org.openqa.selenium.firefox.FirefoxDriver;import org.testng.Assert;import org.testng.annotations.AfterMethod;import org.testng.annotations.DataProvider;import org.testng.annotations.Test;
public class WordpressLogin {
@Test(dataProvider="login") public void loginMySite(String uName, String pass) throws InterruptedException { WebDriver driver = new ChromeDriver(); System.setProperty("webdriver.chrome.driver",".......\\resources\\chromedriver.exe"); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); driver.get("https://xxx.com/user/login");
}
@DataProvider(name="login") public Object[][] passData() { Object[][] data = new Object[2][2]; data[0][0] = "test1"; data[0][1] = "Welcome123@"; data[1][0] = "test2"; data[1][1] = "Welcome123@"; return data; }}--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/86aeb510-c5fd-4041-bb27-2365f99a5e4a%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.
You can try including System.setProperty("webdriver.chrome.driver",".......\\resources\\chromedriver.exe");
Inside a static block.
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.com/
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d5b08189-f876-44db-8880-c8bf6b2475b1%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/iMD9JNnjcxU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/EA8AAD7E-4937-405D-A0E7-C39CCD648E83%40gmail.com.