Error executing OCR - workfusion

Error executing OcrAction
com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=OcrAction.ftl,id=2,name=Optional[OcrAction],parent=-1,nextSibling=3,arguments=ActionArguments[varName=[name],imageName=[C:\Users\Administrator\workfusion-workspace\rpae_project\OCR\1532498224608-anchor-1532498224737.apng],fullImageName=[1532498224608.png],xsi:type=[recorder:OcrAction, recorder:OcrAction],pollingInterval=[300],active=[true],type=[CONTROL],offsetX=[-353],delay=[5000],offsetY=[272],width=[156],actionDetails=[(to 'name' rectangle 156 x 26)],height=[26],awaitTimeout=[5000]]]
at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:54)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:30)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:53)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:153)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:113)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.openqa.selenium.WebDriverException: java.lang.ClassNotFoundException: com.workfusion.desktop.driver.ocr.impl.OcrException cannot be found by com.workfusion.studio.dependencies.rpa-api_9.0.0.3
Build info: version: '9.0.0.3', revision: '1610cb545e', time: '2018-05-24T16:45:36.185Z'
System info: host: 'WIN-NC78EG9TDCU', ip: '192.168.192.133', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.internal.CustomWrapper.isCustomWrapperElement(CustomWrapper.java:44)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:218)
at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:351)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:228)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:48)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:149)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:48)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:656)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:592)
at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:864)
at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:930)
at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:111)
at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:35)
at com.workfusion.rpa.helpers.Ocr$proccessImage.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at Script2.run(Script2.groovy:7)
at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:90)
at com.workfusion.studio.rpa.recorder.playback.player.PlaybackContext.executeScript(PlaybackContext.java:65)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:35)
at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:30)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:53)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:153)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:113)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.workfusion.desktop.driver.ocr.impl.OcrException cannot be found by com.workfusion.studio.dependencies.rpa-api_9.0.0.3
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.openqa.selenium.remote.internal.CustomWrapper.isCustomWrapperElement(CustomWrapper.java:42)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:218)
at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:351)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:228)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:48)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:149)
at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:48)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:656)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:592)
at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:864)
at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:930)
at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:111)
at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:35)
at com.workfusion.rpa.helpers.Ocr$proccessImage.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at Script2.run(Script2.groovy:7)
at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:90)
at com.workfusion.studio.rpa.recorder.playback.player.PlaybackContext.executeScript(PlaybackContext.java:65)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:35)
at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:30)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:53)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:153)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:113)
at java.lang.Thread.run(Thread.java:745)

Related

For Jenkins ver. 1.630, i installed Delivery Pipeline plugin, now jenkins failed to boot with below error

hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException at hudson.WebAppMain$3.run(WebAppMain.java:237) Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269) at jenkins.InitReactorRunner.run(InitReactorRunner.java:44) at jenkins.model.Jenkins.executeReactor(Jenkins.java:910) at jenkins.model.Jenkins.<init>(Jenkins.java:818) at hudson.model.Hudson.<init>(Hudson.java:85) at hudson.model.Hudson.<init>(Hudson.java:81) at hudson.WebAppMain$3.run(WebAppMain.java:225) Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:176) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$7.runTask(Jenkins.java:899) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:106) ... 8 more Caused by: java.lang.NoSuchMethodError: jenkins.model.Jenkins.get()Ljenkins/model/Jenkins; at org.jenkinsci.plugins.workflow.cps.nodes.StepDescriptorCache.getPublicCache(StepDescriptorCache.java:48) at org.jenkinsci.plugins.workflow.cps.nodes.StepDescriptorCache.invalidateGlobalCache(StepDescriptorCache.java:55) ... 13 more
i checked few solutions like delete all plugins etc, but did not work , any help is appreciated
before updating any plugin , take a backup of plugins folder.
i just restored the plugins folder and i am able to boot the jenkins now

HttpHostConnectException when trying to connect to Jenkins Selenium Grid Plugin

I created a Jenkins Selenium Grid using the Selenium Plugin and have registered my nodes.
Now, when I am trying to start the tests on the grid using my machine, I get the following error
Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'sample', ip: 'sample', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_74'
Driver info: driver.version: SeleniumDriver
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'sample', ip: 'sample', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_74'
Driver info: driver.version: SeleniumDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:667)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:255)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:237)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:138)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:175)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to CDEA.emea.abc.corp:4444 [CDEA.emea.abc.corp/172.30.217.175] failed: Connection timed out: connect
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:139)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:87)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:337)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
... 15 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
... 30 more
I can ping the Grid URL (CDEA.emea.abc.corp) and get a response from the same machine. So, I assume I do not need a Proxy? What could be wrong?
I have configured the Nodes and Master through the Plugin itself, they are configured with Chromedriver plugin and are online.
This is how I initiate the connection,
driver = createRemoteDriver(remoteUrl, caps, checkForProxy, settings.getDriverSettings());
where RemoteUrl = http://CDEA.emea.abc.corp:4444/wd/hub
caps = Capabilities [{acceptInsecureCerts=true, browserName=chrome, chromeOptions=org.openqa.selenium.chrome.ChromeOptions#3d8a4416, version=, platform=ANY}]
checkforProxy = false

Error while running openstack code JCloudsNova.java

The description of jclouds is given in the below link.
https://jclouds.apache.org/guides/openstack/. I have packstack installed in the machine.
java -classpath ".:lib/*" JCloudsNova
Exception in thread "main" java.util.ServiceConfigurationError: org.jclouds.apis.ApiMetadata: Provider org.jclouds.openstack.neutron.v2.NeutronApiMetadata could not be instantiated at java.util.ServiceLoader.fail(ServiceLoader.java:232) at java.util.ServiceLoader.access$100(ServiceLoader.java:185) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:281)at com.google.common.collect.ImmutableCollection$ArrayBasedBuilder.addAll(ImmutableCollection.java:360) at com.google.common.collect.ImmutableSet$Builder.addAll(ImmutableSet.java:508) at org.jclouds.apis.Apis.all(Apis.java:72) at org.jclouds.apis.Apis.withId(Apis.java:88) at org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:169) at JCloudsNova.(JCloudsNova.java:39)
at JCloudsNova.main(JCloudsNova.java:19)
Caused by: java.lang.NoClassDefFoundError: org/jclouds/openstack/keystone/v2_0/config/AuthenticationApiModule at org.jclouds.openstack.neutron.v2.NeutronApiMetadata$Builder.(NeutronApiMetadata.java:78) at org.jclouds.openstack.neutron.v2.NeutronApiMetadata.(NeutronApiMetadata.java:51) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380) ... 10 more
Caused by: java.lang.ClassNotFoundException: org.jclouds.openstack.keystone.v2_0.config.AuthenticationApiModule at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 18 more

How to find child of a element in ios?

I can not get child element.
I can see the childNameLabel element under childNameTV element with appium inspector
Example, I try find text of first child element;
List<WebElement> webElements = driver.findElements(By.id("childNameTV"));
webElements.get(0).findElement(By.id("childNameLabel")).getText();
Then i get this error;
org.openqa.selenium.NoSuchElementException: An element could not be
located on the page using the given search parameters. (WARNING: The
server did not provide any stacktrace information) Command duration or
timeout: 7.45 seconds For documentation on this error, please visit:
http://seleniumhq.org/exceptions/no_such_element.html Build info:
version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13
-0700' System info: host: 'cihangir-macbook.local', ip: '10.125.0.57', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.3',
java.version: '1.8.0_131' Driver info:
com.xamarin.testcloud.appium.EnhancedIOSDriver Capabilities
[{app=/Users/cihangirtuna/mobile_app_automation_appium/app/iOS/morhipo.app, networkConnectionEnabled=false, databaseEnabled=false,
deviceName=iPhone 6s Plus, xcodeSigningId=iPhone Developer,
platform=MAC, waitForQuiescence=false, platformVersion=11.2,
webStorageEnabled=false, locationContextEnabled=false,
automationName=XCUITest, browserName=, takesScreenshot=true,
javascriptEnabled=true, platformName=iOS,
udid=303257C6-5EE7-410F-87E2-466E3716265C, autoAcceptAlerts=true}]
Session ID: b522404b-4e02-4d4b-a0c9-2b5ffa1b6d51
---Element info: {Using=id, value=childNameLabel} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
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
io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:43)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1) at
org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:274)
at
io.appium.java_client.DefaultGenericMobileElement.execute(DefaultGenericMobileElement.java:37)
at io.appium.java_client.MobileElement.execute(MobileElement.java:1)
at io.appium.java_client.ios.IOSElement.execute(IOSElement.java:1)
at
org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:177)
at
org.openqa.selenium.remote.RemoteWebElement.findElementById(RemoteWebElement.java:210)
at
io.appium.java_client.DefaultGenericMobileElement.findElementById(DefaultGenericMobileElement.java:53)
at
io.appium.java_client.MobileElement.findElementById(MobileElement.java:1)
at
io.appium.java_client.ios.IOSElement.findElementById(IOSElement.java:1)
at org.openqa.selenium.By$ById.findElement(By.java:218) at
org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:173)
at
io.appium.java_client.DefaultGenericMobileElement.findElement(DefaultGenericMobileElement.java:45)
at
io.appium.java_client.MobileElement.findElement(MobileElement.java:1)
at
io.appium.java_client.ios.IOSElement.findElement(IOSElement.java:1)
at pages.NewSeasonPage.tabSeasonSubCategory(NewSeasonPage.java:43)
at tests.SortTest.testSortPageOpenWithoutLogin(SortTest.java:31) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:47) at
org.junit.rules.RunRules.evaluate(RunRules.java:18) at
org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at
org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at
org.junit.runners.ParentRunner.run(ParentRunner.java:300) at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
"childNameLabel" is an attribute labeled "name," not an ID.
I suspect the following will work for you:
webElements.get(0).findElement(By.xpath("//XCUIElementTypeStaticText[#name=\"childNameLabel\"]")).getText();

Dropdown not working with safariDriver on Safari 10

I am getting below error while accessing dropdown using Safari 10 mac sierra with apple safariDriver:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 17 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'nb-rohitsharma.vserv-it.com', ip: '192.168.1.69', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.4', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.safari.SafariDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, databaseEnabled=true, handlesAlerts=true, version=12603.1.30.0.34, cleanSession=true, platform=MAC, nativeEvents=true, locationContextEnabled=false, webStorageEnabled=true, browserName=safari, javascriptEnabled=true, platformName=macOS, cssSelectorsEnabled=true}]
Session ID: A404BC72-307B-4B5B-802A-EF6021A65544
*** Element info: {Using=xpath, value=//select[#id='programIdSelect']}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
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 com.efollett.ims.CustomLibrary.UserLibrary.selectDDCSdetails_IMS(UserLibrary.java:1369)
at com.efollett.ims.ExistingUser.TS_Reg_IMS_002.EB_NonRental_Ship_Credit(TS_Reg_IMS_002.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:756)
at org.testng.TestRunner.run(TestRunner.java:610)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
at org.testng.TestNG.runSuites(TestNG.java:1133)
at org.testng.TestNG.run(TestNG.java:1104)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
This is a known issue in WebKit. The workaround for now is to use JavaScript to modify the selected elements. You can track the fix here: https://bugs.webkit.org/show_bug.cgi?id=174710

Resources