How to test 1000+ user login credentials in excel sheet

1,639 views
Skip to first unread message

Mohit Yadav

unread,
Mar 29, 2017, 10:52:04 PM3/29/17
to Selenium Users
Hi all,

Am stucked in a task which is related to test 1000+ user account logins present in excel sheet.
Basically i need to test whether all users are able to login or not in web portal by their login credentials.
Total 7500 users, data is present in excel sheet with username and password.

Hoping for reply soon.



Regards
Mohit

----------------------------------------------------------------
Professional Development: Please join us...

----------------------------------------------------------------
This e-mail is confidential. If you are not an intended recipient, please delete this e-mail and notify us immediately. Any unauthorized use or disclosure is prohibited.               
Copyright (c) 2017  108 ideaspace inc.

Krishnan Mahadevan

unread,
Mar 29, 2017, 11:20:26 PM3/29/17
to seleniu...@googlegroups.com

Mohit,

Please let us know what is the issue you are facing?

You can perhaps include the following:

 

·         Selenium version being used

·         What version of IEDriverServer/ChromeDriver/GeckoDriver are you working with?

·         What is the browser flavor and version?

·         What does your code look like?

·         What is the error you are facing?

·         Stack trace/error logs that you have?

 

Without any of these information, people are likely to just treat your email as asking someone else to do your job (which am pretty sure is not your intention).

 

 

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.wordpress.com/

--
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 post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/388b543d-732b-42ce-a7d4-a2fb7c1de02c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vivek Mishra

unread,
Mar 30, 2017, 3:14:42 AM3/30/17
to Selenium Users
You can use apache POI to read the data from excel sheet.
Dowload the poi zip and add it to your project https://poi.apache.org/download.html 

It read the excel based on cell identity (row number and column number). you can write a custom method to read and iterate username and password one by one.
If you are using testng, can also use @dataprovider. 

Inside you login function, write a condition that if it is login successfully, fileoutput stream write pass/fail to the same excel in same row. Or you can use another excel sheet coz count will be same.  

 

DT

unread,
Mar 31, 2017, 10:56:53 AM3/31/17
to Selenium Users
I believe you can do this faster and easier using a load testing tool, for example Apache JMeter, it provides:

  1. CSV Data Set Config - to read the credentials
  2. HTTP Request - to simulate GET and POST requests
  3. Response Assertion - to verify whether user is logged in or not
Also given JMeter is a load testing tool you could run your test scenario in multithreaded manner so it will take seconds instead of hours which Selenium will require. Check out  Logging in to a web-site user manual chapter for more information

Mohit Yadav

unread,
May 12, 2017, 7:28:19 AM5/12/17
to Selenium Users
Here is my code and error log:

Hi All

Am facing issues in a script where we have 7600 users login credentials of a website. Data is present in Excel file. Need to test weather all login credentials are valid or not.
Need help asap.
Am using JXL libraries, below is my code:

package automationFramework;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;



public class LoginTest {

WebDriver driver;
Workbook wb;
Sheet sh1;
int numrow;
String uname;
String password1;

@BeforeTest
public void Setup()

{
System.setProperty("webdriver.chrome.driver", "C:\\Users\\mohitrao\\Desktop\\chromedriver.exe");

    WebDriver driver = new ChromeDriver();

   
    driver.manage().window().maximize();
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
    driver.get("https://www.chiropractic.ca/");
    
   
}

@Test(dataProvider="testdata")
public void TestFireFox(String uname,String password1) throws InterruptedException

{

    Actions action = new Actions(driver);
WebElement we = driver.findElement(By.xpath("html/body/div[1]/div[1]/section[1]/div/div[2]/form/ul/li[2]/a/span"));
action.moveToElement(we).build().perform();
Thread.sleep(5000);

driver.findElement(By.id("user-id")).clear();
driver.findElement(By.id("user-id")).sendKeys(uname);
driver.findElement(By.id("user-password")).clear();
driver.findElement(By.id("user-password")).sendKeys(password1);

driver.findElement(By.xpath("html/body/div[1]/div[1]/section[1]/div/div[2]/form/ul/li[2]/ul/li[4]/input[1]")).click();

}
/*

@AfterMethod
public void tearDown()
{
  driver.quit();
}

*/
@DataProvider(name="testdata")
public Object[][] TestDataFeed() throws BiffException, IOException 


{
// load workbook
wb=Workbook.getWorkbook(new File("C://Users//mohitrao//Desktop//testData.xls"));

// load sheet in my case I am referring to first sheet only
sh1= wb.getSheet(0);

// get number of rows so that we can run loop based on this
numrow= sh1.getRows();



// Create 2d array and pass row and columns
Object [][] facebookdata=new Object[numrow][sh1.getColumns()];

// This will run a loop and each iteration  it will fetch new row
for(int i=0;i<numrow;i++){


// Fetch first row username
facebookdata[i][0]=sh1.getCell(0, i).getContents();
// Fetch first row password
facebookdata[i][1]=sh1.getCell(1, i).getContents();


}
// Return 2d array object so that test script can use the same
return facebookdata;
}



 @AfterTest
 
public void QuitTC(){

// close browser after execution
driver.quit();
}








Here is Error log:

Starting ChromeDriver 2.29.461591 (62ebf098771772160f391d75e589dc567915b233) on port 28366
Only local connections are allowed.
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
May 12, 2017 4:43:39 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
FAILED CONFIGURATION: @AfterTest QuitTC
java.lang.NullPointerException
at automationFramework.LoginTest.QuitTC(LoginTest.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
at org.testng.TestRunner.afterRun(TestRunner.java:958)
at org.testng.TestRunner.run(TestRunner.java:606)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

FAILED: TestFireFox("dickieabbott", "cca49050")
java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770)
at org.openqa.selenium.interactions.Actions.<init>(Actions.java:71)
at automationFramework.LoginTest.TestFireFox(LoginTest.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)


===============================================
    Default test
    Tests run: 1, Failures: 1, Skips: 0
    Configuration Failures: 1, Skips: 0
===============================================


===============================================
Default suite
Total tests run: 1, Failures: 1, Skips: 0
Configuration Failures: 1, Skips: 0
===============================================



If i commented Quit method then this error show:

Starting ChromeDriver 2.29.461591 (62ebf098771772160f391d75e589dc567915b233) on port 24095
Only local connections are allowed.
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
May 12, 2017 4:48:29 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
FAILED: TestFireFox("dickieabbott", "cca49050")
java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770)
at org.openqa.selenium.interactions.Actions.<init>(Actions.java:71)
at automationFramework.LoginTest.TestFireFox(LoginTest.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)


===============================================
    Default test
    Tests run: 1, Failures: 1, Skips: 0
===============================================


===============================================
Default suite
Total tests run: 1, Failures: 1, Skips: 0
===============================================

thi...@thoughtworks.com

unread,
May 26, 2017, 8:53:37 AM5/26/17
to Selenium Users
Hi,

You are doing driver.quit() in two places in aftermethod and aftertest.When aftertest method gets executed,there is no driver instance and that results in null pointer..
Why are you quiting driver in Aftermethod?Instead quit finally at the end when you are done with the test in Aftertest() .Just do driver.close or continue execution by logging first user out and log in second user and so on...and finally driver.quit() 


On Thursday, March 30, 2017 at 8:22:04 AM UTC+5:30, Mohit Yadav wrote:

nagesh royal

unread,
May 3, 2019, 9:36:30 AM5/3/19
to Selenium Users

error3.JPG


Hii All,

I Am facing issues in a script where we have 100 users login columns (user name ,password ) credentials of a website. Data is present in Excel file. Need to test weather all login credentials are valid or not.
 Am facing issues in a script  All  100 users  iam given  both  combination valid and invalid data (username,password ) credentials .but valid is given code is runing .but iam given invalid  data (username,password) code stop in invalid .for loop will stops in failed cases .they are not retrieve data another rows(username,password)  .



  .................................  .................          please Help Me  ...............................................................................



This My code :

                       package hhh;
                 import java.io.File;
 import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.testng.Assert;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

//import Demo1.ExcelOperation;
//import Demo1.ValidationOperation;

public class Demo2  {
WebDriver driver;

HSSFWorkbook workbook;
HSSFSheet sheet;
HSSFCell cell;
@BeforeTest
public void TestSetup(){
System.setProperty("webdriver.chrome.driver","C:\\chrome\\chromedriver.exe");
driver = new ChromeDriver();
//driver.manage().window().maximize();
  driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
}
@Test
public void ReadData() throws IOException, Exception{ 
File src=new File("D:\\Book3.xls");   
    FileInputStream fis = new FileInputStream(src);
workbook = new HSSFWorkbook(fis);
sheet= workbook.getSheet("Sheet1");                   
for(int i=1; i<=sheet.getLastRowNum(); i++){
System.out.println("Reached loop starts");
cell  = sheet.getRow(i).getCell(0);
cell.setCellType(CellType.STRING);
driver.findElement(By.xpath("//input[@name='email_address']")).sendKeys(cell.getStringCellValue());
cell = sheet.getRow(i).getCell(1);
cell.setCellType(CellType.STRING);
driver.findElement(By.xpath("//input[@name='password']")).sendKeys(cell.getStringCellValue());
  Thread.sleep(500);
  cell = sheet.getRow(i).getCell(2);
  cell.setCellType(CellType.STRING);
  driver.findElement(By.xpath("//*[@id='tdb5']/span[2]")).click();
  String ExpectedResult=cell.getStringCellValue();
  String ActualResult=driver.getCurrentUrl();
 sheet.getRow(i).createCell(3).setCellValue(ActualResult);
FileOutputStream fos=new FileOutputStream(src);
String status=ValidationOperation.verify(ExpectedResult, ActualResult);
sheet.getRow(i).createCell(4).setCellValue(status);
workbook.write(fos);
if(driver.getCurrentUrl().equals("http://www.gcrit.com/build3/index.php")){
System.out.println("passed  ");   
  

} else {
System.out.println("failed  ");
}
WebElement link_Home =driver.findElement(By.xpath("//span[text()='Log Off']"));
  Actions action2 = new Actions(driver);
action2.moveToElement(link_Home).build().perform();
Thread.sleep(500);
     driver.findElement(By.xpath("//span[text()='Log Off']")).click();
     
driver.navigate().to("http://www.gcrit.com/build3/login.php");
System.out.println("navigate");
  Thread.sleep(500);
fos.close();
}

}

public static class ValidationOperation {

public static String verify(String ExpectedResult,String ActualResult) {
try
{
Assert.assertEquals(ExpectedResult, ActualResult);
return "pass";
}
catch(AssertionError rv)
{
return "fail";
}

} }
}




Error is :    [TestNG] Running:
  C:\Users\A77 10\AppData\Local\Temp\testng-eclipse--632161196\testng-customsuite.xml

Starting ChromeDriver 2.44.609538 (b655c5a60b0b544917107a59d4153d4bf78e1b90) on port 14469
Only local connections are allowed.
May 03, 2019 5:42:50 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
passed  

error3.JPG

error3.JPG

failed  
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\Default suite\Default test.xml
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\Default suite exists: true
FAILED: ReadData
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//span[text()='Log Off']"}
  (Session info: chrome=74.0.3729.131)
  (Driver info: chromedriver=2.44.609538 (b655c5a60b0b544917107a59d4153d4bf78e1b90),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'DESKTOP-90QO8AJ', ip: '192.168.0.104', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.44.609538 (b655c5a60b0b54..., userDataDir: C:\Users\A7710~1\AppData\Lo...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:63787}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: ignore, unhandledPromptBehavior: ignore, version: 74.0.3729.131, webStorageEnabled: true}
Session ID: a69e65c956417dc6bf16b84b9d6f34f7
*** Element info: {Using=xpath, value=//span[text()='Log Off']}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:428)
at org.openqa.selenium.By$ByXPath.findElement(By.java:353)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)
at hhh.Demo2.ReadData(Demo2.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:646)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:811)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1137)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:753)
at org.testng.TestRunner.run(TestRunner.java:607)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:368)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:363)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:321)
at org.testng.SuiteRunner.run(SuiteRunner.java:270)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1284)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1209)
at org.testng.TestNG.runSuites(TestNG.java:1124)
at org.testng.TestNG.run(TestNG.java:1096)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)


===============================================
    Default test
    Tests run: 1, Failures: 1, Skips: 0
===============================================


===============================================
Default suite
Total tests run: 1, Failures: 1, Skips: 0
===============================================

[TestNG] Time taken by org.testng.reporters.jq.Main@6e8dacdf: 187 ms
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\testng-failed.xml
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\Default suite\testng-failed.xml
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\Default suite exists: true
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 32 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@7e0ea639: 62 ms
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite\toc.html
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite\Default test.properties
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite\index.html
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite\main.html
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite\groups.html
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite\classes.html
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite\reporter-output.html
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite\methods-not-run.html
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite\testng.xml.html
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\Default suite exists: true
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old\index.html
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\old exists: true
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@6a5fc7f7: 156 ms
[Utils] Attempting to create C:\Users\A77 10\eclipse-workspace\Selenium\test-output\junitreports\TEST-hhh.Demo2.xml
[Utils]   Directory C:\Users\A77 10\eclipse-workspace\Selenium\test-output\junitreports exists: true
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@7a0ac6e3: 32 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@5b464ce8: 15 ms















.............................................................................Please Help Me ALL.................................................................................................







Meenal Jain

unread,
May 3, 2019, 9:46:58 AM5/3/19
to seleniu...@googlegroups.com
You have to put the condition over there while checking for logoff button because in case of invalid username abd passord,,logoff option will not be there thats why your yest case getting failed immediately.

If logoff element is not visible then you have to forcefully continue with the loop to test with other users logon data from your sheet.

--
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 post to this group, send email to seleniu...@googlegroups.com.

nagesh royal

unread,
May 4, 2019, 2:37:49 AM5/4/19
to Selenium Users


On Friday, May 3, 2019 at 6:46:58 PM UTC+5, Meenal Jain wrote:
You have to put the condition over there while checking for logoff button because in case of invalid username abd passord,,logoff option will not be there thats why your yest case getting failed immediately.

If logoff element is not visible then you have to forcefully continue with the loop to test with other users logon data from your sheet.

On Fri, May 3, 2019, 19:06 nagesh royal <nagesh...@gmail.com> wrote:


Respected  sir,   
                         Iam not understand your words can you please tell me in programatically .Can you please write  program for that your hands pleases like Examples..........Please Help me sir...........

To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages