2017-08-22 7 views
-1

自動セレンスクリプトがあります。特定の機能を実行するために使用されるmavenプロジェクトの中にあります。問題は、私がTestngを使ってeclipseで起動するときです。 それが失敗し、Eclipseが私に何かのエラーを投げかけて再起動することができません。 私はそれと共にエラートレースをアタッチしました。 org.openqa.selenium.TimeoutException: Expected condition failed: waiting for presence of element located by: By.xpath: //*[text()='com.prism.soap.sftp.msg.mping.iflow']/../../../..//div[@class='OneByOne sapMGTHdrContent'] (tried for 25 second(s) with 2 SECONDS interval) at org.openqa.selenium.support.ui.FluentWait.timeoutException(FluentWait.java:264) at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:232) at com.webui.Others.webui.tooling.Prism_Master_Class.webdriver_wait(Prism_Master_Class.java:47) at com.webui.Monitor.automation.Prism_Selenium_Monitor_Tab.prism_monitor_messageProcessing(Prism_Selenium_Monitor_Tab.java:732) at com.webui.Others.webui.tooling.Message_Processing_Vaidation.messageProcessingCheck(Message_Processing_Vaidation.java:21) 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:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:774) at org.testng.TestRunner.run(TestRunner.java:624) at org.testng.SuiteRunner.runTest(SuiteRunner.java:359) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312) at org.testng.SuiteRunner.run(SuiteRunner.java:261) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215) at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) at org.testng.TestNG.run(TestNG.java:1048) 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) Caused by: org.openqa.selenium.NoSuchElementException: Cannot locate an element using By.xpath: //*[text()='com.prism.soap.sftp.msg.mping.iflow']/../../../..//div[@class='OneByOne sapMGTHdrContent'] For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'INLN50942827A', ip: '10.53.219.90', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_131' Driver info: driver.version: unknown at org.openqa.selenium.support.ui.ExpectedConditions.lambda$findElement$0(ExpectedConditions.java:883) at java.util.Optional.orElseThrow(Unknown Source) at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:882) at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44) at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:183) at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:180) at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:209) ... 27 more セレンスクリプトの実行中にエラーが発生しました

+0

あなたが探している実際のWebElementをfindElementが見つけられなかった場合に可能な 'NoSuchElementException'というエラーが表示されます。 – nullpointer

答えて

0

あなたのエラーは、ロケータコードを使用して見つかりませんでした。NoSuchElementExceptionと呼ばれています。コードをもう一度チェックしてください。

関連する問題