RE: How to handle timeout error in web driver when we run selenium as automation pack?

Lakshay Sharma Default Asked on October 14, 2019 in No Category.

Hi Sajal,

Please give us little more things to investigate. Try providing us the screen shot of the rows, html code behind it or application url would be the best thing to do.

Regards,
Lakshay Sharma

on August 26, 2014.

hi rocky

i would suggest you to mark answer as best if you are satisfied with that
it will motivate people to  answer your questions more frequently..

regards

ankit

on August 26, 2014.

hi kishore

Please provide HTML of That Element to get the Best Solution

on August 26, 2014.

hi richard
Did You Checked It on Firepath for Its occurances..?

on August 28, 2014.

hi luckperez

Your Code Seems Fine to me
try sAustralianBusinessNumber in a Hardcoded Way
May be it will Help You Debugging Your Code

on August 28, 2014.

hi rajesh

Safari Driver requires Safari 5.1+ and only runs on OS X

on September 1, 2014.

Ankit add your reply as Answer, SO that we can close this question. Good reply by you.

on September 1, 2014.

hi
please post the error you are getting

on September 8, 2014.

The above code is fine, there must be some problem in your rest of the code or in autoit script code. But most likely it seems to be a selenium problem. Try upgrading your selenium version.

on September 10, 2014.

Please close the issue, if it is resolved.

on September 12, 2014.

Hi Jogesh,

PLease close this question if resolved.

Regards,
Lakshay Sharma

on September 12, 2014.

Hi Kishor,

There are 12 questions asked by you and you have not even close one Question. Please mark your questions as ANSWERED, if resolved.

Just bring the cursor on the voting button, you will see a check sign, that is to coose the best answer.

Regards,
Lakshay Sharma

on September 12, 2014.

RE: How to handle timeout error in web driver when we run selenium as automation pack?

on September 15, 2014.

Actually I should not post another site here. But i have given it since u have asked the question that is not present in this site..

on September 16, 2014.

Hi Dave,

It will be helpful if you can give us the link of your website having this. Also, what exactly is the problem? are you not able to identify the element using Selenium?

Thanks
Virender

on September 16, 2014.

Kindly post your code along with browser and Selenium Jar versions.

on September 16, 2014.

hi bala
try with latest selenium jars i.e 2.43.1

on September 18, 2014.

Hi Bala,

Please refrain by using test character, it wil take a second more to copy paste the question in the content area.

Regards,
Lakshay Sharma

on September 18, 2014.

Please mark your question as ANSWERED, if your query is resolved.

Regards,
Lakshay Sharma

on September 18, 2014.

Please mark your questions as ANSWERED, if your query is resolved.

Regards,
Lakshay Sharma

on September 18, 2014.

Hi,

can you give us the URL of the site? Its will be good to give accurate answer.

Thanks
Virender

on September 25, 2014.

Could you please post your code.

on September 26, 2014.

Nice question (Up vote for this) and have you tried this? or directly you need code?.

on September 27, 2014.

If your query is resolved then please accept the answer.

on September 27, 2014.

If your query is resolved then please accept the answer.

on September 27, 2014.

If your query is resolved then please accept the answer.

on September 27, 2014.

Sorry som, could you please elaborate your question bit more?. (Specially this:  if I have five classes, then five browsers will open simultaneously and then run the tests. I want to Open Browser at the start once and run all the methods and then close it).

on September 30, 2014.

If your query is resolved then please accept the answer.

on October 1, 2014.

Could you please post your code.

on October 1, 2014.

Could you post you code or sample site please.

on October 1, 2014.

Som, Could you please let us know why you are using @BeforeSuite with Static method?Did you try with different annotation or without static method?.

on October 2, 2014.

Also, requesting you to accept your previous queries answer if they were resolved.

on October 2, 2014.

Hi, Please give us an example, what sort of Utilities you are talking about, as Utilities are project specific..

Regards,
Lakshay Sharma

on October 2, 2014.

Hi  Sachin,

Thanks buddy for taking good care of this Forum.

Regards,
Lakshay Sharma

on October 2, 2014.

@Sumit_ks: If you get the “DataDriven Framework with TestNG” please let me know.

on October 3, 2014.

Can you please elaborate what problem you are facing.?  Are you getting error or exceptions?
or Unable to run on Ecilipse?

on October 10, 2014.

Can you elaborate your question.  Regarding TentNG or junit Frameworks or Data driven or key driven frameworks?

on October 10, 2014.

zk?

on October 14, 2014.

HI balajinatarajan,

Please try to provide some more information. And I see that you have asked 9 questions in total and not marked those as answered. Kindly do the same.

REgards,
Lakshay Sharma

on October 14, 2014.

Hi Hope your varibales are not empty, please give us some more information.

on October 14, 2014.

And why do you want to do that?

on October 14, 2014.

Hi
On  Which Line Your are Getting Null Pointer Exception..?

on October 26, 2014.

Hi Richard,

I request you to close all the questions you asked so far, see how to choose best answer of your question:

http://forumsqa.com/selenium-webdriver/how-to-choose-best-answer-insert-code-vote-up-an-answer/

Your Questions list:

http://forumsqa.com/member/lovetabike/

Regards,
Lakshay Sharma

on October 27, 2014.

Hi Saik

I Guess You are Calling there Methods From Some Other Class Where You Have That @Test anonatation

is it Something like that..?

on October 28, 2014.

Hi Pranamya

Can You Please Tell us The Exact scenerio..?

on October 29, 2014.

Hi Aruna

can you please check the occurances of your Xpath on firepath?

on October 30, 2014.

Hi,

Can you post your code?

Thanks,
Vishal

on November 4, 2014.
on November 4, 2014.
on November 4, 2014.
on November 4, 2014.
on November 4, 2014.
on November 4, 2014.

I did not find the click on Sell To US, please let us know the page as well on which we will get this button.

on November 5, 2014.

Question is very confusing , Can you try to rephrase it

on November 7, 2014.

Hi Aruna

If i was you, probably i would have used css which is much more concise and easy to read
@FindBy(css = “.itinanary_book_now a”)

on November 7, 2014.

Hi MallikThough your screen shot is not clear what i can see is that there is some ConfigurationFailure , I think there is some problem with your configuration code and it is throwing some error/exception due to which all test methods are skippedTry to fix that

on November 7, 2014.

Hi Richard

Missing jars are of selenium ? I am using you are Adding jars to buildpath manually in eclipse .did you moved your selenium jars from one folder to other? If yes then you need to manually configure them again

Other solution would be to convert your project to maven project using the steps mentioned in toolsqa.com

Regards

on November 9, 2014.

Have you checked hybrid and keyword driven framework on toolsqa?

on November 10, 2014.

Never tried this before, but will look into this.

on November 10, 2014.

You may like to use this comment as an answers, so that Richard can close the question.

on November 10, 2014.

Elaborate more on that please.

on November 12, 2014.

Why cant you include the different test scripts in the same project, any specific reasons?

on November 12, 2014.

Hello Biswajit

that’s really strange requirement i would say , why in any case you require test data from different excel sheet ?

always keep it simple:)

on November 14, 2014.

Hello,

After running your code I am getting below error message.

Note: Please let us know what you are trying to do here OR give a steps.


Unable to locate element: {"method":"css selector","selector":"?#?fts_id?"}

Command duration or timeout: 150 milliseconds

For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html

Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'

on November 16, 2014.

Could you please give sample url. So we can look into this.

on November 16, 2014.

@Sachin: correct, code is not working.

Action should not use here, key, mouse actions are different and webdriver actions. :).

Up voted for your solution.

on November 16, 2014.

Hi Sachin,

You can take any SharePoint o365 URL or SharePoint on premise URL.

on November 17, 2014.

hi
builder.moveToElement(programs).build().perform();   // try with this once

on November 18, 2014.

Hi ankit,

Thanks for u r response.I tried with the above statement as suggested by you ,now the eclipse is not throwing any exception but  click  operation on sub menu is not happening.I mean mouse over is happening but click on sub menu is not happening.Can you please throw a light  on this….

Thanks
Praphul

on November 18, 2014.

make sure that your xpath for submenu element is correct

on November 18, 2014.

yea ankit  the xpath is correct,if not it should have thorwn exception(NotElementfound) right?
When i traverse through the source code(through fire bug) it is diable,i mean it is blurred.Is there any workaroud for this problem.Is  it to be handle through javascriptExecuter.If yes can you please post any sample code snippet.Thanks in Advance.

Regards
Praphul

on November 18, 2014.

try after removing that thread.sleep(); once

on November 18, 2014.

and yes using javascript we can do that but it should be working in this way too

on November 18, 2014.

yes i tried still it is not working

on November 18, 2014.

Ankit,

Can you please guide me how to handle mouse over operation using Javascript.If you  post any code snippet or any link demonstrating  mouseover operation would be helpful.

Thanks
Praphul

on November 18, 2014.

Always try to give us the complete information. Please give us atleast two test scripts, so that we can help. Need to look in to the structure of test cases.

Regards,
Lakshay Sharma

on November 18, 2014.

Hi Nisha,

Both the solutions are good below by Ankit & Vishal. Please close your question:
http://forumsqa.com/selenium-webdriver/how-to-choose-best-answer-insert-code-vote-up-an-answer/

Regards,
Lakshay Sharma

on November 18, 2014.

Selenium always have issues with Special character with SendKeys, I suggest you to look for another way with Robot Class or any thing.

on November 18, 2014.

Hello,

Please elaborate your question, so we can help in this.

on November 19, 2014.

Hi Swathi

you can try manually with some key strokes   if that works..??

on November 20, 2014.

Hi Ankit,

Thanks for your response.
Do you mean to use key strokes with third party tools of Slenium such as Autoit??
Or is there any other tool/ solution for doing?

on November 20, 2014.

hi
yes i mean use robot class if possible by keystrokes

on November 20, 2014.

Give us the screenshot of the Iframe and the html of the page, please always try to provide the comeplete information with your question.

Regards,
Lakshay Sharma

on November 20, 2014.

Please provide complete information Satish.

on November 20, 2014.

I have two projects First One to check the Broken links and another one is sending Email report .In the first one i did for report getting all the console output to be stored in a text format and Second one is sending email report with attachment of that Text file  So it can be run by one by one.

on November 20, 2014.

And also am attach some here below code not check if the link have errors in the wordpress website it does not take the title with pipe symbol for eg:title is “Anushkasaloons|You are not authorised to view this page” it run as the link is working bt the fact is link is not working.

for (String t : linkTexts) {
if (t != null && !t.isEmpty()) {
driver.findElement(By.linkText(t)).click();
String title;
title = driver.getTitle();
System.out.println(“title is”+title);
if((title.contains(“You are not authorized to view this page”))||(title.contains(“404”)) ||
(title.contains(“408”))|| (title.contains(“400”)) || (title.contains(“401”))
|| (title.contains(“403”))||(title.contains(“Page not found”))||(title.contains(“500”))||(title.contains(“error”))||(title.contains(“503 Service Unavailable”)))
{
System.out.println(t + ” the link is not working”);
} else {
System.out.println(“\”” + t + “\”” + ” is working.”);
driver.navigate().back();

}
}

on November 20, 2014.

I want a code which parameterize(data driven testing) the login of facebook. To input multiple values to these fields to check their validity. These values should be retrieved from excel.

on November 20, 2014.

Hi
Could you please show us the code where you are calling the browser because I don’t think there is a option in webdriver where you can call any particular version of any browser

on November 20, 2014.

You can use a Sikuli external tool to download an excel from the application. I have tried it and its really good.

LEt me know in case you need more information !

Amit Dahiya
9811060604

on November 21, 2014.

Hi Tushar
Use Xpath For Those Elements

on November 21, 2014.

@sumit,

Unable to understand your question. Please elaborate your question so people can answer to your question.

on November 22, 2014.

Friend plese explian in detail… i didnt get wt u mean by Keystrokes n all…

on November 22, 2014.

Hey its so simple….do one thing just find that sign in element using xpath or linktext whtever n store that as webElement just check out below code

WebElement iframe=d.findElement(By.here use any value in dat iframe ,so dat u can catch that frame)
d.switchto().Frame(iframe);
next find element n click on the elment ok…see below

d.findElement(By.linkText(“Sign In”).click();
Thats it

still any doubt post again vl help u

on November 22, 2014.

Hi Som
I guess Keystrokes Should Work here You Can try WIth That

on November 24, 2014.

Hi AnkitI have no idea about  Keystrokes. Could you please help me out here. its really urgentI just used this commands directly in code 

driver.findElement(By.name("admissionNo")).sendKeys(Keys.CONTROL + "a"); Thread.sleep(2000); driver.findElement(By.name("admissionNo")).sendKeys(Keys.CONTROL + "c");
Could you please explain with some examples 

on November 24, 2014.

Paste a Screenshot of that ELemnt’s Html

on November 24, 2014.

Here is the screenshot of the HTML

RE: How to handle timeout error in web driver when we run selenium as automation pack?

on November 25, 2014.

sir I want to check two condition first is blank value and secound is wrong value. Please check
package esong;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;

public class free_recharge
{
WebDriver driver;
String url = “http://www.easymobilerecharge.com/logmein.php”;

@BeforeTest
public void start()
{
driver = new FirefoxDriver();
driver.get(url);

}

@org.testng.annotations.Test
public void recharge_login() throws Exception
{
driver.findElement(By.xpath(“//input[@name=’userid’]”)).sendKeys(“sumitkv888@gmail.com”);
Thread.sleep(3000);
String i = driver.findElement(By.xpath(“//input[@name=’userid’]”)).getText();
System.out.println(i); // It is not print, I think “i” variable is not
// holding the sendKeys(“sumitkv888@gmail.com”)
// value.
String z = “asdfg”;

System.out.println(i);
if (i.isEmpty())
{
driver.quit();

}
else if (i.equals(“sumitkv8881@gmail.com”))
{

driver.findElement(By.xpath(“//input[@name=’password’]”)).sendKeys(“12345678”);
driver.findElement(By.xpath(“//input[@id=’login_button’]”)).click();
}
else
{
System.out.println(“username is not valid”);
driver.quit();
}
}

@AfterTest
public void close()
{
driver.quit();
}

}

on November 25, 2014.

Hi Shubha

Do you mind posting your code here ?

on November 26, 2014.

I even tried to return the eDriver from class1 & tried to use that in Class2. In this scenario also getting the same error.

on November 27, 2014.

Hi
Might Possible That Collections ‘s Href Contains the same Keyword  as  it is Clicking Some Other Element

on November 27, 2014.

Send us the screenshot of the application  and some more part of HTML to analysis.

on November 27, 2014.

Hi ANkit, thanks for the response. I thought the same but even when I change the xpath to ‘GetTerminatedPending’ instead of ‘GetTerminatedPendingReport’, it still jumps to the ‘GetBreachPendingReport’ page

on November 27, 2014.

Please tell us the exception you are getting on this, is it no such element exception or the stale element exception.
If the option.getText() method is working, the rest should also work.
Please set the thread.sleep () for 5 sec after “addressSelectorDropdown.click();” and check if the drop down is also displayed as open list for 5 secs. If it gets closed after click then this is the issue that selenium is not able to click on the list elements, as it is closed.

on November 29, 2014.

Hi Ayo, Is that resolve?

on December 1, 2014.

Thanks. The list is open but the click does not work!

on December 1, 2014.

It can be a browser problem as well, please try with another browser. Try clicking with different ways, like mouse hovering the first value of the drop down and then click, click with build().perform(), or double click. But please do let us know the exception type.

on December 2, 2014.

Hi
Normally Xpath Start WIth    //

on December 2, 2014.

Here is another code I tried to use…

WebElement PlaceOrderDiv = driver.findElement (By.className(“summary”));
//WebElement checkoutForm = checkoutDiv.findElement(By.tagName(“form”));
WebElement PlaceOrderButton = PlaceOrderDiv.findElement(By.tagName(“input”));
PlaceOrderButton.click();

Nothing happens. No error come up. This make sit more difficult..

on December 2, 2014.

I think your question is Selenium WD+Jenkins+Maven setup, correct?. And Junit or TestNG?.

on December 4, 2014.

Hi Nisha
ExcelWSheet.getLastRowNum() it gives you the lost row number containing data
Suppose if you have data in First Row and 50 th row it will return Value 50
So might possible you have Data there

on December 6, 2014.

Hello

What type of question is this ?

Can you please post some code also what you have used or xpath /Css for identifying the element ?
I am sure pasting just picture of Dom wont be much helpful to you and others

on December 7, 2014.

Yes it is .And  i need for testNG

on December 8, 2014.

Please close your answer.

on December 9, 2014.

That sign in link may present in frame ,so only its not clicking it seems…check once whether that link is present in frame…if so use code
Driver.switchto.Frame(webElelment argued)
Next click on it..I m guessing ,so try once.
Let me know whether it worked or not n all

on December 11, 2014.

Hi Pradeep,
The element is not inside frame & it is hidden so I am trying to click that hidden element with javascript code with the help of JavascriptExecutor, but its not executing.
Thanks&Regards
Samba.

on December 12, 2014.

Hi Som
Why not Try Something Like That   //tag[@name=’xyz’]   .?

on December 12, 2014.

Can you  give me a example

on December 12, 2014.

any Exception or Error..?

on December 12, 2014.

Hi
please give Some More Details..?

on December 14, 2014.

Either provide more details on this question or I will delete this question.

on December 15, 2014.

Dear Sir, Here I am writing all of my code,

This is my Util Class to read data from excel file and returning data


package com.syner.poi;
import java.io.FileInputStream;

import java.io.FileNotFoundException;

import java.io.IOException;

import java.io.InputStream;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;

import org.apache.poi.ss.usermodel.Cell;

import org.apache.poi.ss.usermodel.Row;

import org.apache.poi.ss.usermodel.Sheet;

import org.apache.poi.ss.usermodel.Workbook;

import org.apache.poi.ss.usermodel.WorkbookFactory;
public class Util {

public static Object[][] readExcelData() throws InvalidFormatException, IOException

{

Object[][] data=new Object[4][2];

InputStream f=new FileInputStream("GmailTestData.xlsx");

Workbook workbook=WorkbookFactory.create(f);

Sheet sheet=workbook.getSheetAt(0);

int rc=sheet.getLastRowNum();

for(int i=0;i<rc;i++)

{

Row r=sheet.getRow(i+1);

int cc=r.getLastCellNum();

for(int j=0;j<cc;j++)

{

Cell c=r.getCell(j);

if(c.getCellType()==c.CELL_TYPE_STRING)

{

data[i][j]=c.getStringCellValue();

}

else if(c.getCellType()==c.CELL_TYPE_NUMERIC)

{

//data[i][j]=c.getNumericCellValue();

data[i][j]=new Long((long) c.getNumericCellValue());

}

System.out.println("Data: "+data[i][j]);
}

}
return data;
}
}

This is my ExcelFile class to get data from Util class and execute the tesecases.


package com.syner.poi;
import java.io.IOException;

import java.lang.annotation.Retention;

import java.lang.annotation.RetentionPolicy;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.firefox.FirefoxDriver;

import org.testng.annotations.AfterMethod;

import org.testng.annotations.BeforeMethod;

import org.testng.annotations.DataProvider;

import org.testng.annotations.Test;
public class ExcelFile {

WebDriver driver;
@DataProvider(name="excelData")

public Object[][] readData() throws InvalidFormatException, IOException

{

return Util.readExcelData();

}
@BeforeMethod

public void setUp()

{

driver=new FirefoxDriver();

driver.manage().window().maximize();

driver.get("https://accounts.google.com/SignUp?service=mail&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&ltmpl=default");

}
@Test(dataProvider="excelData")

public void testApp(String firstName,long mobileNumber)

{

driver.findElement(By.xpath(".//*[@id='FirstName']")).sendKeys(firstName);

driver.findElement(By.xpath(".//*[@id='RecoveryPhoneNumber']")).sendKeys(""+mobileNumber);

}
@AfterMethod

public void tearDown() throws InterruptedException

{

Thread.sleep(3000);

driver.close();

}
}

This is my  GmailTestdata excel file.

RE: How to handle timeout error in web driver when we run selenium as automation pack?

When I execute the above code, it has to execute 3 times because GmailTestdata excel file having 3 recods but it is executing 4 times and for 4th time it is taking (null,null) as arguments.

Thanks & Regards
Samba.

on December 15, 2014.

PLease close this question.

on December 15, 2014.

Please close the question Nitin.

on December 15, 2014.

Please close the question.

on December 16, 2014.

I request you to close all of your questions now.

on December 16, 2014.

This is not manual testing forum, please DELETE YOUR QUESTIONS.

on December 17, 2014.

This is not manual testing forum, please DELETE YOUR QUESTIONS.

on December 17, 2014.

Hi Pradeep,

Can you post whats the error in your IDE? We will be able to help you if you can post the error logs here. Thanks

on December 18, 2014.

Here s my Exception:

SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects…
[INFO]
[INFO] ————————————————————————
[INFO] Building Pradeep 0.0.1-SNAPSHOT
[INFO] ————————————————————————
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom (5 KB at 5.9 KB/sec)
[INFO]
[INFO] — maven-resources-plugin:2.5:resources (default-resources) @ Pradeep —
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ Pradeep —
[INFO] Nothing to compile – all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.5:testResources (default-testResources) @ Pradeep —
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] — maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ Pradeep —
[INFO] Nothing to compile – all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.17:test (default-test) @ Pradeep —
[WARNING] The POM for org.apache.maven:maven-plugin-api:jar:2.0.9 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.surefire:maven-surefire-common:jar:2.17 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.surefire:surefire-api:jar:2.17 is missing, no dependency information available
[WARNING] The POM for org.apache.maven:maven-toolchain:jar:2.0.9 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2 is missing, no dependency information available
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 3.924s
[INFO] Finished at: Thu Dec 18 18:42:11 IST 2014
[INFO] Final Memory: 6M/15M
[INFO] ————————————————————————
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project Pradeep: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.17 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.surefire:maven-surefire-common:jar:2.17, org.apache.maven.surefire:surefire-api:jar:2.17, org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2, org.codehaus.plexus:plexus-utils:jar:1.1: Failure to find org.apache.maven.surefire:maven-surefire-common:jar:2.17 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

on December 18, 2014.

Hi
Make Sure u are using the right Driver with correct version of  Selenium jar

on December 18, 2014.

hi
<class name=”qabrowsers.qabrowsersTest” /> i think there is some problem in this line
<class name=”address to class starting from package”/>

i guess in your case it should be
<class name=”TestNG.qabrowsers “/>
and i dnt think you have test case in that class what u have before and after class

on December 19, 2014.

Please post your code and xml here, so anyone will look into this. What you did we don’t know so Please Please next time onwards you post your code because you will get response quickly.

For reference see below url for the same issue.

on December 19, 2014.

May be you can try to relocate/reinspect the element before using gettext().

This might have occurred as the reference for the inspected element has been lost.

on December 24, 2014.

Can you share the code for isElementPresent ? what there in the implmentation

on December 29, 2014.

This is a very beautifully asked question. Thanks Uday!

on December 31, 2014.

Hi

This is very unusual way of implementation , havent tried this before but could please take your @Test Method and implement as part of other class and then try ?

on January 2, 2015.

Hi
if it is a web page definately selenium can automate it

on January 5, 2015.

Hi
Validate the Elements that Differentiate Other Pages from Home page,
if those Elements are present that Means its Home page Else not

on January 7, 2015.

You can probably use the TestNG’s grouping feature which lets you to group the related @Test methods.

And to run specific @Test you can use include or exclude in TestNG.xml

For details you can refer the TestNG documentation :
http://testng.org/doc/documentation-main.html#test-groups

on January 7, 2015.

Might be Issue With Selenium jars and Your Chrome version
Make Sure You are Using Right Version of Selenium jars with Compatable Chrome version

on January 8, 2015.

try identifying them with xpath

on March 4, 2015.

WHat do you mean by no HTML on client side? do you have any example of site? You have just said something very very new to me. Example will help

Virender

on March 5, 2015.

hi
I don’t think you can capture that capcha .
the role of capcha is to protect from bots

on March 9, 2015.

Ankit thats a correct answer can you please add this as an answer.

on March 9, 2015.

Dont ask questions as if you are asking it to yourself. Ask it as if you are asking it to some one who has no knowledge about what you are doing. Put as much details as possible. Here we are not able to understand what you are doing.

Virender

on March 13, 2015.

Hi Sandeep123,It requires elaborate example from experts of ToolsQA team members. Eagerly awaiting their response.Regards, Lajish

on March 19, 2015.

It is worked Mistake in the loop.

on March 20, 2015.

Hello Rishi,

In that link only everything is explained, please go through once again.

Where exactly you are facing the issue and what is your efforts on your question?.

t
Sachin

on March 21, 2015.

Hi Venu,Your question and code is not matching, please check once again.Q1: Check the username and password is correct in the login page. A: Code is present.Q2: Checking whether the user is valid when the log out button is visible. A: Where is the code for logout? and validating the user.Make sure what you are asking at-least entire scenario so any one can give the answer to your question.t Sachin

on March 22, 2015.

If build time is fixed then we can do something like this

1. Create a batch file that can start u r regression suite using cmd like if u r regression suite is built through maven prj then we can execute it using cmd
2. Batch file will do following
open cmd,excute command to run regression suite
3. A Cron/Scheduler should be created that can run u r batch file at specific time i.e. after dev build is created.
Cron benefits are u can schedule for daily @ some specific time like run daily at 12 pm

Consider them as different problem statements and try to find solution

on March 25, 2015.

Hi tilston,

I have google the problem statement’s and found it is actually possible to create a cron in java prg to run a specific task at some time

I am new user to toolsqa, so i m not sure we can actually use third party links  in this portal, I m using link because ur problem is very different

http://stackoverflow.com/questions/22163662/how-to-create-a-java-cron-job

Regards
Amit Jain

on March 26, 2015.

Hi Amit, that’s great, many thanks for your answer. I’m going to take some time now to go through what you’ve said and get it set up…..but it looks like it is possible, which is great!

The confusion for me still lies around what Jenkins does, as opposed to Maven? Are they both required? What different elements do they provide?

on March 26, 2015.

I have not worked on Jenkins but heard that is continuous build and Integration option a kind of release tool, not sure but I think it also contains scheduler.

Maven is pure open source build tool by which we can build our java project, It provide various plugin by which we can create directory structure of project, compile our project etc. Its importance comes to effect when opensource library updates at that time it automatically download all dependent jars from maven repository so that our test cases can run fine with changing versions of jar

Here is very good explanation to it.
http://www.toolsqa.com/java/maven/maven-introduction/

on March 26, 2015.

Can you tell which type of API it is like rest API ? some more details are required about the system u  r talking

on March 28, 2015.

It differs on the given xpath value. Thanks

on March 30, 2015.

Hi everyone,

This is a mandate thing for all who are using POM in real time in there projects

Any one who can check in there code and see what validations are put to ensure page is correct

on April 7, 2015.

did u means you want to do open something in new tab of same browser ?? [Context click is an option for that]

I am also not sure if switchTo can be applied at browser level, I think it can be applied to an element in DOM ?? virender sir please clarify.

OR did u mean u open a browser and multiple small small browser windows are opened by default like advertisement windows and u want to switch to one of these windows ??

 

on April 22, 2015.

Since this question is very old, Is this still open for discussion, I found near by one working answer to this problem.  ???

on April 22, 2015.

Hi Amit,

It seems that Ravi is referring to switch windows only.  SwitchWindow works well in case of browser windows but doesnt work when use for tabs.

I think if Ravi shares more code, we will be able to identify the problem.

Thanks for you participation Amit!! it is much appreciated by the Toolsqa  team.

Virender

on April 23, 2015.

Hi Santosh,

Could you please share the application url and HTML code for the object so we can look into this.

on May 8, 2015.

Please look into these links url 🙂 may you will get the solution.

Without code or sample application, etc can’t guess what type of issue you are facing. So please provide the details.

As per your above query the simple answer is: you are using wrong identifier/locator, so it is not identifying the date and performing action on that.

on May 9, 2015.

RE: How to handle timeout error in web driver when we run selenium as automation pack?

on May 20, 2015.

Please elaborate your question or post the sample code that you are using.

on May 27, 2015.

thanks.
Im new to selenium.  i have this scenario where i click a name link on page from a group of names, and it takes to next page called  details page.  For some Names  the page will shows a button called “change”.  I m able to find this button . no problem with that. But for certain devices the page should not show or not display this “change” button.
i need to check whether this button is present on this page for that particular Name and pass the test if its not existing.
Further , im able to see the  result as passed  in eclipse console only when i manually close the browser.  Its not quitting or closing or stopping the execution even when i gave the driver.quit().   Its working perfectly when the button is exiting but  not when asking the selenium to find the button that is not existing.

i used the following options in my code separately

1.
WebElement element = driver.findElement(By.xpath(“//*[@id=’Name’]”));
Assert.assertFalse(element.isDisplayed());
System.out.println(” Button is not present”);
Reporter.log(” button not present”);

2.
WebElement Element = driver.findElement(By.xpath(“//*[@id=’Name’]”));
if(Element == null){
Assert.assertFalse(true);
//driver.quit();
}
driver.quit();

3.
if (driver.findElement(By.xpath(“//*[@id=’Name’]”))!=null)
{
Reporter.log(“Change  button is DISPLAYED on  details page for a Non User, hence test failed”);
System.out.println(“change  button IS present on  details page”);
driver.quit();
}
else
{
Reporter.log(“Change  button is NOT DISPLAYED on  details page for a Non User, hence test passed “);
System.out.println(“change owner button NOT present on device details page”);
}
driver.quit();

4.
List<WebElement> E = driver.findElements(By.id(“Name”));
int NE = E.size();
if(NE == 0)
System.out.println(“Test passed”);
driver.quit();

on May 27, 2015.

Please elaborate what actually your problem is.

on May 27, 2015.

Hi,

Kindly share your script and other details like Handset Model, Andoid/IOS, Mahine Windows/Mac and if you are following the tutorial on toolsqa.com, please tell us what all steps you have done before running the scripts.

Regards,
Lakshay Sharma

on June 28, 2015.

Please share the code you are using

on July 3, 2015.

Found a workaround. Read some comments about the GUI not starting when you use Jenkins as a windows services.

Stopped the jenkin service .
Opened Jenkins from command prompt by giving java -jar Jenkins.war
configured the project and it works fine.

But still want to know how can I see the GUI when running Jenkins as a windows service?

on July 4, 2015.

This is the code

package test;

import org.openqa.selenium.firefox.FirefoxDriver;

public class sample {

private static FirefoxDriver driver;

public static void main(String[] args) {
// TODO Auto-generated method stub

driver = new FirefoxDriver();

driver.get(“http://www.toolsqa.com/selenium-webdriver/selenium-introduction/”);

}

}

directly open Firefox browser the same URL its working fine well the running the script getting error.

RE: How to handle timeout error in web driver when we run selenium as automation pack?

on July 6, 2015.

I guess you need to find the difference between mousehover and click first then only you will be able to understand that in technical terms

on July 16, 2015.

If you inspect element then you can see that every email has it’s own span and unique xpath so using xpath here you can click on specific email.

on July 28, 2015.

Can you share what you tried ???

on July 31, 2015.

Please add the complete code , what does the Method array contains.
Please elaborate a bit so that we can help you

on August 9, 2015.

Can you please add the images again , we are not able to view the samePlease add the complete Html where you can the see the form

on August 9, 2015.

Please provide the code you have used , so that we can provide you a solution .

on August 9, 2015.

Please provide the code what you have tried . This forum is to clear doubts for the issues faced and or any details needed. Please try out the sample script from your end for the above scenario.We will help you if you face any issues. 

on August 9, 2015.

Please try out a sample scripts for the same from your end . we will help you if you face any issues

on August 9, 2015.

Can you please provide the code you have tried for tracking the issue in an easier way

on August 9, 2015.

Can you please put your code in the code  format so that we can provide a better solution

on August 9, 2015.

Can you put some sample images with HTML part , so that we can provide you a better solution

on August 10, 2015.

Can you try giving an unique class name for each test.

Can you provide a snapshot of your project along with test file which the xml is referring to for a better view .

on August 11, 2015.

this is my execution engine
——————————–

package familyportal;

import java.io.FileInputStream;
import java.util.Properties;
import java.lang.reflect.Method;

import org.apache.log4j.xml.DOMConfigurator;
import org.openqa.selenium.WebDriver;

import fpconfig.Constants;
import fpconfig.FPActionKeywords;
import utility.FPExcelUtils;
import utility.Log;

public class FamilyLogin {

public static Properties OR;
public static Class actionKeywords;
public static String sActionKeyword;
public static String sPageObject;
public static Method method[];
public static Object obj;
public WebDriver driver;

public static int iTestStep;
public static int iTestLastStep;
public static String sTestCaseID;
public static String sRunMode;

public FamilyLogin() throws NoSuchMethodException, SecurityException, ClassNotFoundException, InstantiationException, IllegalAccessException
{

actionKeywords=Class.forName(“fpconfig.FPActionKeywords”);

obj=actionKeywords.newInstance();

method=actionKeywords.getDeclaredMethods();

}

public static void main(String[]args) throws Exception
{

FPExcelUtils.setExcelFile(Constants.path_TestData);

//This method is to start log4j in the Test Case
DOMConfigurator.configure(“log4j.xml”);

String Path_OR= Constants.Path_OR;
FileInputStream fs = new FileInputStream(Path_OR);
OR=new Properties(System.getProperties());
OR.load(fs);

FamilyLogin startEngine=new FamilyLogin();
startEngine.excute_TestCase();

}

public void excute_TestCase()throws Exception
{
//This Will return the total number of test cases mentioned in the Test Cases Sheet

int iTotalTestCases =FPExcelUtils.getRowCount(Constants.Sheet_TestCases);

System.out.println(“this is count”+iTotalTestCases);

//This loop will execute number of times equals to total number of test cases
for (int iTestCase=2;iTestCase<=iTotalTestCases;iTestCase++)
{

//This is to get Test Case name from the Test Case Sheet
sTestCaseID=FPExcelUtils.getCellData(iTestCase, Constants.Col_TestCaseID, Constants.Sheet_TestCases);

System.out.println(sTestCaseID);
//This is to get Value of the Run Mode Column from the current Test Case
sRunMode = FPExcelUtils.getCellData(iTestCase,Constants.Col_RunMode,Constants.Sheet_TestCases);

//This is the Condition statement on Run Mode Value
if(sRunMode.equals(“Yes”))
{
System.out.println(sRunMode);

//Only if the Run mode is yes this part of code will execute
iTestStep=FPExcelUtils.getRowContains(sTestCaseID, Constants.Col_TestCaseID, Constants.Sheet_TestSteps);

System.out.println(“test step”+iTestStep );

iTestLastStep=FPExcelUtils.getTestStepCount(Constants.Sheet_TestSteps,sTestCaseID,iTestStep);
Log.startTestCase(sTestCaseID);

System.out.println(“test step”+iTestLastStep );

//This loop will execute number of times equals to Total number of test Steps
for(;iTestStep<=iTestLastStep;iTestStep++)
{

sActionKeyword=FPExcelUtils.getCellData(iTestStep,Constants.Col_ActionKeyword,Constants.Sheet_TestSteps);

sPageObject=FPExcelUtils.getCellData(iTestStep, Constants.Col_PageObject, Constants.Sheet_TestSteps);
execute_Actions();
}
Log.endTestCase(sTestCaseID);
}
}

}

public static void execute_Actions() throws Exception {

try
{

for(int i=0;i<method.length;i++)
{

System.out.println(“Invoce please”);
System.out.println(method[i]);
method[i].invoke(obj,sPageObject);

System.out.println(“Invoced”);
break;
}

}

catch (Exception e)
{
e.printStackTrace();
}

}

}

and this is my action Class
———————————-

package fpconfig;

import java.util.concurrent.TimeUnit;

import static familyportal.FamilyLogin.OR;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import familyportal.FamilyLogin;
import utility.Log;

public class FPActionKeywords {

static WebDriver driver;

static void openBrowser(String object)
{

System.out.println(object);
driver=new FirefoxDriver();

}

static void navigate(String object)

{
System.out.println(object);
driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
driver.get(Constants.URL);

}

static void maxWindow(String object)
{
System.out.println(object);
driver.manage().window().maximize();

}
static void inputUsername(String object)
{

driver.findElement(By.id(OR.getProperty(object))).sendKeys(Constants.UserName);

}

static void inputPassword(String object)
{

driver.findElement(By.id(OR.getProperty(object))).sendKeys(Constants.Password);

}

static void clickLogin(String object)
{

driver.findElement(By.id(OR.getProperty(object))).click();

}

static void waitFor(String object) throws Exception
{
System.out.println(object);
Thread.sleep(5000);

}

static void clickLogout(String object)
{

driver.findElement(By.linkText(OR.getProperty(object)));

}

static void closeBrowser(String object)

{
System.out.println(object);
driver.quit();

}
}

this is the error that I am getting
————————————–

java.lang.reflect.InvocationTargetException
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 familyportal.FamilyLogin.execute_Actions(FamilyLogin.java:131)
at familyportal.FamilyLogin.excute_TestCase(FamilyLogin.java:110)
at familyportal.FamilyLogin.main(FamilyLogin.java:64)
Caused by: java.lang.NoClassDefFoundError: org/slf4j/Logger
at org.apache.logging.slf4j.SLF4JLoggerContext.getLogger(SLF4JLoggerContext.java:41)
at org.apache.logging.log4j.jcl.LogAdapter.newLogger(LogAdapter.java:34)
at org.apache.logging.log4j.jcl.LogAdapter.newLogger(LogAdapter.java:30)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
at org.apache.logging.log4j.jcl.LogFactoryImpl.getInstance(LogFactoryImpl.java:40)
at org.apache.logging.log4j.jcl.LogFactoryImpl.getInstance(LogFactoryImpl.java:55)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:657)
at org.apache.http.conn.ssl.AbstractVerifier.<init>(AbstractVerifier.java:89)
at org.apache.http.conn.ssl.AllowAllHostnameVerifier.<init>(AllowAllHostnameVerifier.java:40)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:126)
at org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:65)
at org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.getDefaultHttpClientFactory(ApacheHttpClient.java:234)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.<init>(ApacheHttpClient.java:211)
at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:88)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:62)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:57)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:93)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
at fpconfig.FPActionKeywords.openBrowser(FPActionKeywords.java:23)
… 7 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.Logger
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 32 more
Invoce please
public void fpconfig.FPActionKeywords.openBrowser(java.lang.String)
Nevigate to Web Site
java.lang.reflect.InvocationTargetException
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 familyportal.FamilyLogin.execute_Actions(FamilyLogin.java:131)
at familyportal.FamilyLogin.excute_TestCase(FamilyLogin.java:110)
at familyportal.FamilyLogin.main(FamilyLogin.java:64)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory
at org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:65)
at org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.getDefaultHttpClientFactory(ApacheHttpClient.java:234)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.<init>(ApacheHttpClient.java:211)
at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:88)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:62)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:57)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:93)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
at fpconfig.FPActionKeywords.openBrowser(FPActionKeywords.java:23)
… 7 more

on August 24, 2015.

Can you please elaborate or add screenshots for the Same for more info.

on September 6, 2015.

probably you can put the cell values in String variables and compare for easy access.

on September 6, 2015.

This may be the issue with the repository , some time it may not be able to connect to the maven repository please use a user defined Settings.xml to map to a repository to download the jar files.

There may a firewall issue to get the jars from a default repository

on September 7, 2015.

I don’t think we will be able to run the code using the above info provided.
Please if you can provide the complete set up , I may help you with root cause. can you do that from your end 🙂

on September 7, 2015.

Can you show your script?

on October 15, 2015.

Hi Swati,

Can you be more specific? What version are you using?

Best Regards,

Luck

on October 27, 2015.

Hi Luck,

I have downloaded SciTE Version 3.6.0 wherein, I am following the steps Tools >AU3Recorder in the SciTE editor and I am unable to get the record window. I have followed the steps mentioned under Upload file in Selenium with AutoIT Recorded Script on the web page http://www.toolsqa.com/selenium-webdriver/autoit-selenium-webdriver/


Thanks,
Swati

on October 27, 2015.

can you please paste your complete code here..?

on November 18, 2015.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package executionEngine;
import java.io.FileInputStream;
import java.lang.reflect.Method;
import java.util.Properties;
import config.ActionKeywords;
import config.Constants;
import utility.ExcelUtils;
public class DriverScript {
public static Properties OR;
public static ActionKeywords actionKeywords;
public static String sActionKeyword;
public static String sPageObject;
public static Method method[];
public DriverScript() throws NoSuchMethodException, SecurityException{
actionKeywords = new ActionKeywords();
method = actionKeywords.getClass().getMethods();
}
    public static void main(String[] args) throws Exception {
     String Path_DataEngine = Constants.Path_TestData;  
     ExcelUtils.setExcelFile(Path_DataEngine, Constants.Sheet_TestSteps);
//Declaring String variable for storing Object Repository path
     String Path_OR = Constants.Path_OR;
//Creating file system object for Object Repository text/property file
FileInputStream fs = new FileInputStream(Path_OR);
//Creating an Object of properties
OR= new Properties(System.getProperties());
//Loading all the properties from Object Repository property file in to OR object
OR.load(fs);
     for (int iRow=1;iRow<=9;iRow++){
     sActionKeyword = ExcelUtils.getCellData(iRow, Constants.Col_ActionKeyword);
     sPageObject = ExcelUtils.getCellData(iRow, Constants.Col_PageObject);
     execute_Actions();
     }
     }
     private static void execute_Actions() throws Exception {
for(int i=0;i<method.length;i++){
if(method[i].getName().equals(sActionKeyword)){
//This is to execute the method or invoking the method
//Passing ‘Page Object’ name and ‘Action Keyword’ as Arguments to this method
method[i].invoke(actionKeywords,sPageObject);
break;
}
}
}
}
on November 18, 2015.

Hi Ankit,

In this case I am getting NULL POINTER ERROR at line no. 32 & 36.

on November 18, 2015.

@arifi, what is your doubt? please ask one by one..

on December 12, 2015.

can you please post your scenerio here..?

on January 12, 2016.

I have a folder structure.
scenarios :
1. Click on the + of the folder structure and expand the folder.
2. And again expand the sub- folder and so on till 3 sub- folder.
3. Now select the value from the folder and drag and drop.

Problem: if i get  the XPath value of the first folder using find Elements. the error is “Unable to locate element”

on January 12, 2016.

can you please check if the folder is in same frame or is in some other iframe..?

on January 12, 2016.

Also I am interested in finding out which one is the popular way to achieve above referred task?
Thanks

on January 20, 2016.

You just put a Thread.sleep(num of miullisec);
IWebDriver driver = new FirefoxDriver();
after this line.

on January 21, 2016.

it didn’t work as i want to because i want to do something like this:


IWebDriver  driver = new FirefoxDriver(); /delay startup mozilla for some sec. During this time i want to set startup position of window(code below)

driver.Manage().Window.Position = new Point(-2000,0);


Your solution opens firefox browser and wait some sec, then do the rest of the code.
I want to delay startup web browser. or mayby someone know how to add some preference to for ex. firefox profile to set different position window of web browser when it starts.
I need smth like this because i need to change firefox browser position while web browser start. When i’m doing smth like this:

IWebDriver driver = new FirefoxDriver(ffprof);

driver.Manage().Window.Position = new Point(-2000,0);


Browser change position but after a while since browser  opens.
I want to open in different position

on January 21, 2016.

i guess you are looking some thing like this
driver.manage().window().setPosition(new Point(-2000, 0));

on January 22, 2016.

Did you put wait for this popup..?
i guess you might be having  wait issue.

on January 27, 2016.

Hi

Can you share HTML/DOM & your code-snippet, to take a look?

Thanks

on February 4, 2016.

Hi Aman,

Are you using too much Thread.sleep in your script..?
What is the implicit timeout set in your script..?

on February 12, 2016.

Sorry,  I didn’t see this question until just now.

I am not using too much Thread. sleep. There are few places where I am using about 2 seconds of it.

For the driver, I have most of the places the 5 seconds wait.
–  driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

In places where I need the Page to Load, I have the longest 20 second wait as below.
–  WebDriverWait wait = new WebDriverWait(driver, 20);

I hope this helps.

Thanks

on February 16, 2016.

Hi,

Total wait time = 60 seconds
Polling time = ??

Are you adding Sleep Additional to the polling time?
If possible share code snippet.

on February 17, 2016.

You can assign any driver instance
it depends on requirement  say if you wanted to run your test cases in I.E

System.setProperty(“webdriver.ie.driver”, “D:\ToolsQA\OnlineStore\drivers\IEDriverServer.exe”);
  driver = new InternetExplorerDriver();

follow this link

http://toolsqa.com/selenium-webdriver/testng-multi-browser-cross-browser/
for more info

on February 29, 2016.

That is just an additional level of abstraction that allows you to use WebDriver interface in your code instead of its particular implementation – FirefoxDriver. WebDriver variable may be any of available drivers. FirefoxDriver can only be a FirefoxDriver.

It just makes easier to switch between different drivers later.  If you do not need it, then no much difference for you.

on February 29, 2016.

These are right answers can you both please put them as answers so that the question can be marked as answered.

on March 2, 2016.

http://www.vivobarefoot.com/uk

on March 14, 2016.

Remove that . before span and try

on April 7, 2016.

still not working

on April 10, 2016.

first try to locate the element with the xpath you are trying ,
then implement

on April 20, 2016.

Hi Nafis
try this as username field dont have an is assigned to it
WebElement UserName = driver.findElement(By.name(“UserCode”));

on May 9, 2016.

Hi rajashutosh,

It might sound  a bit dumb, either you have a low RAM on your system or your server response time is very slow. Apologies if I’m wrong.

Thanks,
Vishal

on May 25, 2016.

Hi Amith,

You can use input[starts-with(@id,’ctl00_ContentPlaceHolder1′)] in your XPATH

Thanks,
SD

on June 22, 2016.

driver.findElements(by.xpath(“//ul/li”));
it will give you a list of li having there parent as ul

on June 24, 2016.

synchronize in  what way>??

on June 27, 2016.

Exactly the same question, what do you mean by “does not synchronise” ? Please put enough details in your questions.

on June 28, 2016.

Hi chaitanya,

you can ttry this
System.setProperty(“webdriver.gecko.driver”, “path/to/wires.exe”);
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(“marionette”, true);
WebDriver driver = new FirefoxDriver(capabilities);

i tried the same on linux machine did nt worked may be it can work if you are using windows machine

on June 30, 2016.

please share your code here

on June 30, 2016.

Have an example?

on July 6, 2016.

Can you share the html plz?

on July 8, 2016.

Hi ted,

Can you please lets us know your scenerio and what you wanted to achieve??

on July 12, 2016.

RE: How to handle timeout error in web driver when we run selenium as automation pack?

here is the html, plz check

on July 12, 2016.

Hi Rahul,

Crone job is the thing you are looking for. you can google more about how to schedule and create cron job to run your selenium test cases.

on July 26, 2016.

@Vijaya,

First, you are configuring selenium+jenkins – this is correct but your dev team is not deploying the code in jenkins correct? then how your job will run? (Without triggering the build?).

Second, your dev team using git for version control tool (I think). So you need to configure selenium+git+jenkins. You have to configure git location in jenkins and when it will trigger any commit then your selenium scripts will run from jenkins.

Thanks,
Sachin

on August 23, 2016.

Do you mean Xpath? or ID?

on January 10, 2017.

can you paste the screenshot?

on January 11, 2017.

Hi Rajnish,

You can read this book Foundations of Software Testing – ISTQB Certification 3 Edition.

Thanks,
SD

on February 3, 2017.

any Exception?

on February 16, 2017.

Below is the complete error:

Listening on port 3639
Only local connections are allowed
Feb 23, 2017 2:10:35 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Exception in thread “main” org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 54 milliseconds
Build info: version: ‘unknown’, revision: ’86a5d70′, time: ‘2017-02-16 07:47:51 -0800’
System info: host: ‘FARRUKH-PC’, ip: ‘192.168.0.112’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_121′
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:3639/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
Session ID: 0d886e55-d7a8-4753-92a7-36fdfff6e7c1
*** Element info: {Using=xpath, value=.//*[@id=’loginForm’]/div/div/div[3]/input}
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:216)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:635)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:368)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:473)
at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:360)
at CRM.Testcase.main(Testcase.java:29)

on February 23, 2017.

Please use,

Thread.sleep has consider the time in miliseconds,

try{
--CODE
Thread.Sleep(1000);
}catch(Expression ex){
system.out.print(ex.getmessage());
}

Using explicit wait is better to be suggested, because it is a kind of wait for a certain condition to occur before proceeding further in the code.

on March 5, 2017.

Email : gurpreetm382@gmail.com

Exp: 1.10 yrs in Testing

on April 17, 2017.

Can you provide your machine details like OS name and if it is 32 / 64 bit machine?

on May 15, 2017.

Please paste the entire code.

on May 16, 2017.

Can you provide the URL?

on May 16, 2017.

Hi,

use gecko driver for  firefox and set properties in your script.

on May 29, 2017.

Firefox version is 45.0.2 and when i checked the code line wise i found that after clicking the XPATH link mentioned, it does not click back, forward links but the to (URL) and refresh code is executed in a flash of a second.  Any suggestions !!!!!!!!!!!!

on July 3, 2017.

Hi Garvita,

 

Try with that

driver.findElement(by.xpath(“//input[@name=’file_field]”)).sendkeys(“Your path to that file”)

make sure the file is from .xls or from those given formats

 

here you have added this line

elem.sendKeys(“C:/driver/test.exe”);     //not working

the file you are passing here is .exe

that could be the issue that you are not able to upload ur file.

 

you can share your exception you are getting if this workaround dont work for you

 

 

 

on July 12, 2017.

Hi Ankit,

That i added just like that. I am sending :

elem.sendKeys(“M:\\codes\\ipd\\apps\\evsd_documents\\tests\\Glucose_sensors_importable_test10.xlsx”);

 

Thanks,

Garvita Girotra

on July 12, 2017.

are you able to upload file manually?? can i see the exception you are getting in file upload??  

The html seems pretty simple i am sure you must be missing some basic thing

 

I guess u need to comment this line

// elem.click();  

and then try uploading without clicking on element

on July 13, 2017.

Hi

I am not sure what u are trying to achive

but i guess u wanna log your results using testng

 

you can try this line

Reporter.log(“your message here”);

and it will appear in ur testng reports

 

 

on July 18, 2017.

Hi

First put testng jar in ur class path

and then execute this command

java org.testng.TestNG testng.xml

on July 18, 2017.

Hi Sireesha,

 

This html is not clear. Can you please explain in detail that what you are trying to achieve??

on December 28, 2017.

1)Press F12

2)Click on inspect element and click on ‘+’ button.

3)A tag will be highlighted. and it looks like </img, this tag will be related to the image of + but the functionality tag of + button (which will open the page) will be of the above tag of the highlighted one and it might also have some comments like this will open the page. this tag will be your source for Xpath or by ID.

4)other wise please post a screen shot after inspecting the element. please see that the the above and below tag of the highlighted tag also comes in the screenshot

on January 19, 2018.

I’m not understand your problem, please especific your requirement

on January 23, 2018.

when i execute  my scripts through command prompt then system shows me an error like “Unable to access the jar file”

RE: How to handle timeout error in web driver when we run selenium as automation pack?

on February 12, 2018.

Are the identifiers unique?

You could use an XPath like

//a[@class=’identifier’]/text()

to grab the “A00-B99”. If you need to base it on the identifiers in the <div> element, you could try

//div[@data-titledivname=’z1′]/../a/text()

which should give the “A00-B99” and

//div[@data-titledivname=’z1′]/../text()

which should grab “Certain infectious…”. You may need to use indexes (add [1] or [2], etc.) because I’m not positive the second one won’t give you “A00-B99Certain infectious…”

 

roger

on March 7, 2018.

Please share your http source code for better analysis and good resoluation

on March 28, 2018.

It is Possible.

Please share your Https source code for better analysis and good resolution

on March 28, 2018.

Hi All,

Got solution for this issue.

Need to add json-simple jar to Build path as External jar file. Below is the path where this jar is available.

http://www.java2s.com/Code/Jar/j/Downloadjsonsimple11jar.htm

Added this jar & when I ran same program working fine.

 

Thanks,

Yagna Vardhan T

on April 5, 2018.

I am also facing the same issue and tried to find any solution since last 1 week but no luck 🙁  @mahi99 atleast could you please help me out by sharing how you able to fix this issue in your project. That would be really a great help !!

Thanks a lot in Advance!

You can mail me also at: rashmita.parida2@gmail.com

on May 14, 2018.

Adding the following dependency to POM.xml solved the issue for me

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>23.2-jre</version>
</dependency>
<dependency>

on June 1, 2018.

just wanted to confirm one thing are beforeclass and @test method are in same class??  

and can you please try passing parameters like this

@Parameters({“first-name”})

on July 18, 2018.

use below VB macro to compare two excel sheets.

Sub Compare()
Call compareSheets(“Sheet1”, “Sheet2”)
End Sub
Sub compareSheets(shtSheet1 As String, shtSheet2 As String)
Dim mycell As Range
Dim mydiffs As Integer
‘For each cell in sheet2 that is not the same in Sheet1, color it yellow
For Each mycell In ActiveWorkbook.Worksheets(shtSheet2).UsedRange
    If Not mycell.Value = ActiveWorkbook.Worksheets(shtSheet1).Cells(mycell.Row, mycell.Column).Value Then
        mycell.Interior.Color = vbYellow
        mydiffs = mydiffs + 1
    End If
Next
‘Display a message box to demonstrate the differences
MsgBox mydiffs & ” differences found”, vbInformation
ActiveWorkbook.Sheets(shtSheet2).Select
End Sub
on February 19, 2019.
Add Comment
2 Answers

Hi Abi,

You got me wrong. I did not want you to increase the wait time to 60 secs and I assume that you are increasing that wait time in your implicitly wait statement. That is not the issue here.

To cut it short just to find out the root cause, add Thread.sleep(1000) after every click(). You will see that after this no test will fail. If it is too much to do then implement logging and get all the failure elements and add sleep just before clicking those elements.

This is not the solution but to get the idea what is going wrong here. If this works, then I will tell you the logic behind it.

Regards,
Lakshay Sharma

Professor Answered on December 8, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.