Issue 8711 in selenium: Sutomation throwing an Exception: Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element:

15 views
Skip to first unread message

sele...@googlecode.com

unread,
Oct 2, 2015, 3:45:15 PM10/2/15
to selenium-develope...@googlegroups.com
Status: Invalid
Owner: ----

New issue 8711 by rohit.we...@gmail.com: Sutomation throwing an Exception:
Exception in thread "main" org.openqa.selenium.NoSuchElementException:
Unable to locate element:
https://code.google.com/p/selenium/issues/detail?id=8711

Hello,

I am an Oracle IDM Developer. I am trying to Automate the Unit Testing of
Applications which are on the Platform.
While creating the users in IDM, I am facing an issue. While trying to
locate the various text boxes required for creating the user, it is
throwing an exception that no such element is found.

The Derails of Error is:


Exception in thread "main" org.openqa.selenium.NoSuchElementException:
Unable to locate element:
{"method":"xpath","selector":"/html/body/div[1]/form/div[1]/div/div/div/div/div[2]/div/div[2]/div/div/div/div[5]/div/div[1]/div[2]/div/div[2]/div/div[1]/div/div[6]/div/div[1]/div[2]/div/div[1]/div/div/div[2]/span/div/div/div/table/tbody/tr/td[2]/table/tbody/tr/td[5]/div/table/tbody/tr/td/table/tbody/tr[4]/td[2]/span/input"}
Command duration or timeout: 75 milliseconds
For documentation on this error, please visit:
http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26
23:59:50'
System info: host: 'E0306757', ip: '145.230.130.32', os.name: 'Windows
8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.7.0_67'
*** Element info: {Using=xpath,
value=/html/body/div[1]/form/div[1]/div/div/div/div/div[2]/div/div[2]/div/div/div/div[5]/div/div[1]/div[2]/div/div[2]/div/div[1]/div/div[6]/div/div[1]/div[2]/div/div[1]/div/div/div[2]/span/div/div/div/table/tbody/tr/td[2]/table/tbody/tr/td[5]/div/table/tbody/tr/td/table/tbody/tr[4]/td[2]/span/input}
Session ID: e9abe672-83fa-4e0a-8fd9-9b4cac5533b4
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=WINDOWS, acceptSslCerts=true,
javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true,
browserName=firefox, handlesAlerts=true, nativeEvents=false,
webStorageEnabled=true, rotatable=false, locationContextEnabled=true,
applicationCacheEnabled=true, takesScreenshot=true, version=41.0}]
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:204)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)
at
org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:449)
at org.openqa.selenium.By$ByXPath.findElement(By.java:357)
at
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
at Test.main(Test.java:61)
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate
element:
{"method":"xpath","selector":"/html/body/div[1]/form/div[1]/div/div/div/div/div[2]/div/div[2]/div/div/div/div[5]/div/div[1]/div[2]/div/div[2]/div/div[1]/div/div[6]/div/div[1]/div[2]/div/div[1]/div/div/div[2]/span/div/div/div/table/tbody/tr/td[2]/table/tbody/tr/td[5]/div/table/tbody/tr/td/table/tbody/tr[4]/td[2]/span/input"}
For documentation on this error, please visit:
http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26
23:59:50'
System info: host: 'E0306757', ip: '145.230.130.32', os.name: 'Windows
8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.7.0_67'
Driver info: driver.version: unknown
at <anonymous
class>.FirefoxDriver.prototype.findElementInternal_(file:///C:/Users/WEKHAN~1/AppData/Local/Temp/anonymous6174218639509795149webdriver-profile/extensions/fxdr...@googlecode.com/components/driver-component.js:10271)
at <anonymous
class>.FirefoxDriver.prototype.findElement(file:///C:/Users/WEKHAN~1/AppData/Local/Temp/anonymous6174218639509795149webdriver-profile/extensions/fxdr...@googlecode.com/components/driver-component.js:10280)
at <anonymous
class>.DelayedCommand.prototype.executeInternal_/h(file:///C:/Users/WEKHAN~1/AppData/Local/Temp/anonymous6174218639509795149webdriver-profile/extensions/fxdr...@googlecode.com/components/command-processor.js:12274)
at <anonymous
class>.DelayedCommand.prototype.executeInternal_(file:///C:/Users/WEKHAN~1/AppData/Local/Temp/anonymous6174218639509795149webdriver-profile/extensions/fxdr...@googlecode.com/components/command-processor.js:12279)
at <anonymous
class>.DelayedCommand.prototype.execute/<(file:///C:/Users/WEKHAN~1/AppData/Local/Temp/anonymous6174218639509795149webdriver-profile/extensions/fxdr...@googlecode.com/components/command-processor.js:12221)


Please help me in this regard.
My Code is:

//import org.openqa.selenium.By;
import java.util.List;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
//import org.openqa.selenium.ie.InternetExplorerDriver;


public class Test {

public static void main(String arg[]){

System.out.println("Opening of OIM Identity Console by using Silenium");


WebDriver driver = new FirefoxDriver();

System.out.println("Firefox is opened");

driver.get("http://localhost:14000/identity/");

System.out.println("OIM Page is opened Successfully");

System.out.println("Please enter the System Admin UserName for OIM");

driver.findElement(By.id("pt1:_pt_it1::content")).sendKeys("xelsysadm");

System.out.println("Please enter the System Admin Password for OIM");


driver.findElement(By.id("pt1:_pt_it2::content")).sendKeys("Weblogic@123");

System.out.println("Click on Sign In Button to login into OIM");



driver.findElement(By.id("pt1:_pt_cb1")).click();

System.out.println("Login is successful");

System.out.println("Click on Request Identity");



driver.findElement(By.className("x11f")).click();

driver.findElement(By.className("x11v")).click();

//driver.findElement(By.className("x12k")).click();



driver.findElement(By.id("pt1:_mod_tb:0:oc_7567316981region1:0:cmi19")).click();

System.out.println("Create Consultant User");

System.out.println("Enter the Required Details");



driver.findElement(By.xpath("/html/body/div[1]/form/div[1]/div/div/div/div/div[2]/div/div[2]/div/div/div/div[5]/div/div[1]/div[2]/div/div[2]/div/div[1]/div/div[6]/div/div[1]/div[2]/div/div[1]/div/div/div[2]/span/div/div/div/table/tbody/tr/td[2]/table/tbody/tr/td[5]/div/table/tbody/tr/td/table/tbody/tr[4]/td[2]/span/input")).sendKeys("Rohit");

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);


System.out.println("Test Added Successfully");




}
}


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages