Questions tagged [exception]

An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions. When an error occurs within a method, the method creates an object and hands it off to the runtime system.

Filter by
Sorted by
Tagged with
0 votes
1 answer
19 views

Facing 500 series Error while running Jmeter Selenium script in Azure pipeline

while executing the Jmeter selenium scripts in azure pipeline ,I repeatedly seeing the error 500 error saying that "No Such Session Found" But while running the same script in our Virtual ...
Abinav's user avatar
  • 1
0 votes
0 answers
127 views

Element Not Interactable Exception Selenium

from selenium import webdriver from selenium.webdriver.support.ui import Select import time from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import ...
Pammvi Group's user avatar
1 vote
2 answers
105 views

Which exception happens in Selenium when the wait isn't long enough?

When we give a wait of 15 seconds and the application response time is 20 seconds, selenium throws an errorr Which is the exception that selenium throws?
Tejveer Singh's user avatar
0 votes
1 answer
111 views

Selenium Couldn't identify App crashes Android

Sometimes app crashes. But Selenium can only handle "noSuchElementException" or "TimeOutException". Does Appium runs a listener or something which tracks if the app is crashed? I ...
Rashad Nasirli's user avatar
3 votes
1 answer
206 views

In unit tests, should I check all null and invalid child properties in the input arguments that cause error and force developers too?

In a large application, I have a lot of methods with input arguments that each argument is a model with nested models (as you see in the image). You see that I have written some conditional codes and ...
Ramin Bateni's user avatar
1 vote
2 answers
912 views

i found Null pointer exception while executing testng in selenium

package com.tng; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.AfterMethod; import org....
Hari narasing's user avatar
-1 votes
2 answers
3k views

Selenium, Exception: $Proxy19 cannot be cast to org.openqa.selenium.By

I wanted to make use of WebDriverWait however I got this exception: "java.lang.ClassCastException: com.sun.proxy.$Proxy19 cannot be cast to org.openqa.selenium.By" It is caused by the 3rd line of ...
Beti's user avatar
  • 317
0 votes
1 answer
199 views

Unable to launch Firefox driver using selenium

I'm getting error like Exception in thread main java. NoClassDefFoundError:com/google/common/collect/immutableMap and above are the full screen shots:
user41039's user avatar
0 votes
0 answers
244 views

I am unable to execute selenium code as my browser is quitting by showing null pointer exception

[System] initializing MQSeleniumFW [System] validation Status : false [System initilaizing Logging properties] MQFWToolInstance: 2386190563904 [System Logging properties successfully initilaized] [...
Poornima's user avatar
0 votes
2 answers
1k views

Unable to locate Text element using XPath in Selenium [closed]

This is my HTML page and I have some problem with my automation code and it is not able to locate the element and this is the XPath I used: @FindBy(xpath="//div[contains(text(),'Done')]") HTML Code: ...
Sai Dinesh's user avatar
0 votes
3 answers
3k views

How to resolve 'No such element exception'?

I am getting below error even though I was using correct identifier. No such element exception: Unable to locate element: {"method":"id","selector":"input_001"} HTML Code: <input type="text" ...
D Vadlamoodi's user avatar
-1 votes
1 answer
257 views

Pop up handling in Selenium using try and except block gives a broad exception warning

try: if browser.find_element_by_xpath('//[@id="s"]/a').is_displayed(): browser.find_element_by_xpath('//*[@id="s"]/a').click() browser.switch_to.default_content() ...
Dev Bin's user avatar
  • 39
0 votes
2 answers
2k views

Failed To Launch IE Driver Using Selenium WebDriver?

I am trying to execute the selenium web driver script in IE browser but I got this error? can any one provide the solution. Code : import org.openqa.selenium.WebDriver; import org.openqa.selenium.ie....
jamuna's user avatar
  • 1
0 votes
1 answer
17k views

How to resolve InvalidSelectorException in Selenium?

selenium.common.exceptions.InvalidSelectorException: Message: invalid selector Unable to locate an element with the xpath expression .//*[@id="Toolbar"]/table/tbody/tr/td[2]/a[1]/span)[3] because of ...
Ankit Kumar's user avatar
0 votes
1 answer
12k views

Getting Invalid Element State Exception

I am trying to clear text from <div> section using XPath using the below line. Clear Element Text xpath=//*[@id="intro-overlay"]/div I am getting below Error: ...
qaautomation2018's user avatar
0 votes
2 answers
1k views

Chrome Driver crashes on send_keys

I am a Windows 10 Python user. I use the most recent Python version from JetBrain (PyCharm) Until recently my code had no problem with the webdriver.send_keys command. I have recently tried to use ...
Bey Melamed's user avatar
1 vote
4 answers
19k views

How to resolve NoSuchElementException in Selenium with java?

CODE: driver.findElement(By.name("USER")).sendKeys("XYZ"); driver.findElement(By.name("PASSWORD")).sendKeys("abc"); I have tried various ways not just name but by xpath, css selectors but every time ...
Satadip Ghosh's user avatar
0 votes
3 answers
16k views

ElementNotVisibleException: Message: element not visible

I've seen this error everywhere, but none of the solutions have seemed to work. This is my code: contpayment = driver.find_element_by_class_name('nsg-bg--nike-orange') contpayment.click() Python/...
123ang's user avatar
  • 1
0 votes
2 answers
1k views

How to resolve Null pointer Exception?

Class 1: Logintest: import Utility.BrowserFactory; import org.testng.annotations.BeforeMethod; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.PageFactory; import org.testng....
Bhuvani's user avatar
1 vote
4 answers
14k views

selenium.NoSuchElementException: Unable to locate element: #passwordNext

Error: Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: #passwordNext For documentation on this error, please visit: http://seleniumhq.org/exceptions/...
PriR's user avatar
  • 13
1 vote
1 answer
2k views

Best practices for exception handling with Selenium

I've been searching on google for best practices regarding exception handling, however I did not have much success besides using try-catch. My framework is set with a EventFiringWebDriverwhich, ...
elgato's user avatar
  • 173
0 votes
1 answer
30k views

The import org.apache.commons.io cannot be resolved : Java [closed]

I am trying to do the following import in java project: import org.apache.commons.io.FileUtils; This displays following error message in eclipse: The import org.apache.commons.io cannot be resolved ...
Sudeept's user avatar
  • 57
2 votes
1 answer
1k views

Selenium randomly hangs on getPageSource()

I have this part of code: try { Document doc=Jsoup.parse(broswer.getPageSource(),broswer.getCurrentUrl()); return doc; } catch (Exception ex) { event.log("Error while creating ...
Guest's user avatar
  • 21
0 votes
1 answer
6k views

Getting 'nullPointerException' in @AfterMethod [closed]

Code: import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.AfterMethod; import org.testng....
ankitha's user avatar
5 votes
7 answers
23k views

driver.manage(...).timeouts is not a function

I'm using Node.js selenium-webdriver and I have this annoying issue. The issue is that the wait function throws an exception in console. var webdriver = require('selenium-webdriver'), By = webdriver....
Nazar's user avatar
  • 51
1 vote
1 answer
78 views

Cannot use WebDriverExceptionEventArgs.ThrownException in Selenium C#

I am encountering a problem trying to use WebDriverExceptionEventArgs.ThrownException: firingWebDriver.ExceptionThrown += new EventHandler<WebElementEventArgs>(_ExceptionThrown); static ...
elgato's user avatar
  • 173
-1 votes
1 answer
2k views

java.lang.NullPointerException occured while implementing driver initialization through inheritance

Base class: public class Base { public WebDriver driver ; @BeforeMethod public void initialize() { System.setProperty("webdriver.chrome.driver", "/Users/apple/eclipse-workspace/Selenium/...
Batu-QA's user avatar
  • 21
2 votes
2 answers
14k views

java.lang.NullPointerException when running a testcase via Selenium webDriver in Chrome (Page factory model)

I'm getting a java.lang.NullPointerException when running a test case via Selenium webDriver in Chrome (Page factory model) Testcase: package Google; import org.openqa.selenium.WebDriver; import ...
Batu-QA's user avatar
  • 21
-3 votes
1 answer
3k views

java.lang.NullPointerException when running a testcase via Selenium webDriver in Chrome

There is my code: LoginPage Class: public class LoginPage { private WebDriver driver; public LoginPage(WebDriver driver) { this.driver = driver; } private By loginField = ...
Nazar's user avatar
  • 51
0 votes
2 answers
317 views

Unable to click image in Wordpress text editor

A test case where image and content are to be added in WP text editor under post section. I want to select the image that is uploaded in the editor but it always says "Unable to locate element" ...
Rabia Asif's user avatar
-1 votes
3 answers
12k views

How to resolve 'ClassNotFoundException' error in Selenium?

Error: java.lang.ClassNotFoundException Eclipse Error: While executing my code, getting above error, can anyone please help me on this?
sanchit arora's user avatar
0 votes
2 answers
8k views

Button click is not redirecting to next page in selenium webdriver

I am trying to do Bus Search first on Travelyaari.com and then Modify the Bus Search, The Modify Search button seems to be clicked, however, previous Bus search result page is getting loaded and my ...
Jyoti Shivkar's user avatar
0 votes
1 answer
6k views

Uncaught Exception java.lang.StackOverflowError. See log file for details. in JMeter3.2 version [closed]

2017-11-20 11:18:29,079 ERROR o.a.j.JMeter: Uncaught exception: java.lang.StackOverflowError: null at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:1038) ~[?:1.8.0_144] at java.lang....
SQA's user avatar
  • 119
0 votes
3 answers
1k views

NullPointerException is thrown on second method when using dependsOnMethods TestNG attribute with Selenium

package testNG; import java.util.concurrent.TimeUnit; import org.openqa.selenium.*; import org.openqa.selenium.WebDriver; import org.testng.annotations.*; public class TestNGUsingFacebook { ...
Ned's user avatar
  • 103
1 vote
0 answers
128 views

Setting text on WpfEdit control throws pile of exceptions that are then caught -- Is this typical?

I'm doing some coded UI automation, and I've noticed something odd when debugging. When I try and set the text on a WpfEdit control Control.Text = "foo", the system throws a gigantic pile of ...
Sidney's user avatar
  • 175
2 votes
2 answers
7k views

Error: System.NullReferenceException error in Selenium with NUnit

I'm getting following error at verification stage: "An unhandled exception of type 'System.NullReferenceException' occurred in nunit.framework.dll Additional information: Object reference not set to ...
OA345's user avatar
  • 545
2 votes
1 answer
537 views

NoSuchElementException: Cannot locate an element using XPath

I am getting XPath error. Already tried with many XPath's. But not able to resolve. Can anyone give correct XPath? XML: <form id="report-filter-form" class="report-filter-form" accept-charset="...
siva871's user avatar
  • 31
3 votes
1 answer
92 views

Is it reasonable to ask developers to specify exception type?

I am testing a Customer Relationship Management software package. I noticed that when a certain critical error occurs, an exception message will pop up but this exception message will only state: ...
Yu Zhang's user avatar
  • 9,932
0 votes
1 answer
3k views

No such element exception while handling elements inside tables in Selenium Webdriver

I'm trying to access a select HTML element using Selenium WebDriver. But I'm getting a org.openqa.selenium.NoSuchElementException. This is happening only while handling elements inside a table. ...
kaushik3993's user avatar
0 votes
5 answers
8k views

Selecting option on dropdown with one option using Java Selenium Webdriver

I'm trying to select an option from dropdown with one option using the below code; but I'm getting an error message that reads "Element should have been "select" but was "li" CODE: WebElement ERA = ...
Thabiso Ditabe's user avatar
1 vote
0 answers
25 views

Adding exception annotation in Phpunit

I'm using assertContains() method and I want to add an exception because during the test, if this return false it's stopped and not running the second test. I followed the PhpUnit documentation but I ...
Baini.Marouane's user avatar
1 vote
1 answer
1k views

Sendkeys NOT working for textfield

While trying the below code driver.findElement(By.id("txt_UserName")).click(); driver.findElement(By.xpath(".//*[@id='txt_UserName'][@name='txt_UserName'][@class='formInput']")).sendKeys(new String("...
karthik B's user avatar
1 vote
0 answers
332 views

How to trigger java.lang.NoClassDefFoundError: Could not initialize class XXXX [closed]

Rarely I get this error java.lang.NoClassDefFoundError: Could not initialize class XXXX when starting tomcat. It is caused by one of my classes. I have a static variable that gets the user agent in a ...
Yanki Twizzy's user avatar
4 votes
1 answer
41k views

"java.lang.NoClassDefFoundError" : A JNI error has occurred

I'm working with selenium webdriver. I tried so many times to execute my script. It's showing an error again and again. What will I do to resolve? What is the solution for this? I am using eclipse ...
user avatar
0 votes
2 answers
2k views

StaleElementException - After using navigate().back()

I'm trying to automate a testcase, where in there are around 30 links in a page. All these links will lead to a new page. And depending upon on a value in the new page, I need to either proceed or ...
kanayikkaran's user avatar
-1 votes
2 answers
1k views

I am getting java.lang.NullPointerException while executing my test case

I am getting java.lang.NullPointerException while executing my test case , I am using Page Object Modle with PageFactory ,following are the code snippets TestBase Class: ackage com.base; import ...
Hassan's user avatar
  • 327
2 votes
1 answer
2k views

Selenium: clean way to iterate of list of WebElements who become stale during the iteration

This is my code: foreach(IWebElement close in el.FindElements(By.ClassName("search-choice-close"))) { close.Click(); TestHelper.WaitForAjaxCompletion(d); } The elements listed in ...
FDM's user avatar
  • 5,904
1 vote
2 answers
2k views

Solution on ElementNotVisibleException in Selenium

I need to click on a link which displays a popup. But, I'm receiving the following exception: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be ...
Lakshmi Priya's user avatar
2 votes
3 answers
38k views

Selenium not finding button and throwing null pointer exception

I'm trying to click a button using webdriver. Firepath is able to find the button using the xpath I'm giving but selenium is throwing null pointer exception. This page contains two buttons with same ...
Midha's user avatar
  • 23
1 vote
2 answers
11k views

Java.sql.SQLException: No suitable driver found

As i am connecting to JDBC with jmeter im getting the error even though my url, jdbc driver class, username and password is provided correctly. Below is the error : 2014/04/21 18:59:09 WARN - ...
Emmanuel Angelo.R's user avatar