Manfred Lobo
2018-12-06 20:21:38 UTC
Hi All,
I face the issue " Cannot run program, CreateProcess error=2, The system
cannot find the file specified" for the following code.
Getting error in runAutoIT method present at the end of the code. Your help
is highly appreciated.
code is as follows:
package com.cstudymaven.testscript;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.Test;
import com.cstudymaven.utilities.ReadExcel;
import com.cstudymaven.pompages.EditProfile;
import com.cstudymaven.pompages.SignInPage;
import com.cstudymaven.utilities.BaseTest;
public class TestScript extends BaseTest
{
SignInPage signin = null;
EditProfile edprf=null;
@Test
public void signUp()
{
String[][] credentials = ReadExcel.getData(filePath, "User_Login");
try {
for (int i = 1; i < credentials.length; i++) {
String email = credentials[i][0];
String password = credentials[i][1];
signin = new SignInPage(driver);
signin.clickonLogin();
Thread.sleep(1500);
signin.enterEmail(email);
Thread.sleep(1500);
signin.enterPassword(password);
signin.clicktoStart();
edprf=new EditProfile(driver);
wait = new WebDriverWait(driver, 10);
Thread.sleep(1500);
edprf.editprofile();
Thread.sleep(1500);
edprf.gotoprofile();
Thread.sleep(1500);
edprf.editlogo();
Thread.sleep(1500);
edprf.camera();
Thread.sleep(2500);
edprf.cfile();
Thread.sleep(1500);
runAutoIT(); //AutoIT function
}
}
catch (Exception e)
{
e.printStackTrace();
try
{
}
catch (Exception e1)
{
}
}
}
//AutoIT method to handle windows dialog box
public void runAutoIT() throws Exception
{
String
strFilePath="C:\\Users\\LOBO\\Desktop\\Manfred\\Resume\\1Amanfred.jpg";
String
strPath="C:\\Users\\LOBO\\eclipse-workspace\\CaseStudyMaven\\InputData\\cstudymaven.exe";
String strParameter=strPath+""+strFilePath;
Runtime.getRuntime().exec(strParameter);
}
}
I face the issue " Cannot run program, CreateProcess error=2, The system
cannot find the file specified" for the following code.
Getting error in runAutoIT method present at the end of the code. Your help
is highly appreciated.
code is as follows:
package com.cstudymaven.testscript;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.Test;
import com.cstudymaven.utilities.ReadExcel;
import com.cstudymaven.pompages.EditProfile;
import com.cstudymaven.pompages.SignInPage;
import com.cstudymaven.utilities.BaseTest;
public class TestScript extends BaseTest
{
SignInPage signin = null;
EditProfile edprf=null;
@Test
public void signUp()
{
String[][] credentials = ReadExcel.getData(filePath, "User_Login");
try {
for (int i = 1; i < credentials.length; i++) {
String email = credentials[i][0];
String password = credentials[i][1];
signin = new SignInPage(driver);
signin.clickonLogin();
Thread.sleep(1500);
signin.enterEmail(email);
Thread.sleep(1500);
signin.enterPassword(password);
signin.clicktoStart();
edprf=new EditProfile(driver);
wait = new WebDriverWait(driver, 10);
Thread.sleep(1500);
edprf.editprofile();
Thread.sleep(1500);
edprf.gotoprofile();
Thread.sleep(1500);
edprf.editlogo();
Thread.sleep(1500);
edprf.camera();
Thread.sleep(2500);
edprf.cfile();
Thread.sleep(1500);
runAutoIT(); //AutoIT function
}
}
catch (Exception e)
{
e.printStackTrace();
try
{
}
catch (Exception e1)
{
}
}
}
//AutoIT method to handle windows dialog box
public void runAutoIT() throws Exception
{
String
strFilePath="C:\\Users\\LOBO\\Desktop\\Manfred\\Resume\\1Amanfred.jpg";
String
strPath="C:\\Users\\LOBO\\eclipse-workspace\\CaseStudyMaven\\InputData\\cstudymaven.exe";
String strParameter=strPath+""+strFilePath;
Runtime.getRuntime().exec(strParameter);
}
}
--
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-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/481c3a7c-6f89-4268-9768-25fe9af6f106%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/481c3a7c-6f89-4268-9768-25fe9af6f106%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.