Process crashed while executing startServer - Please Help!

I can’t get it to work…@mayu can you please combine element = self.driver2.find_element_by_android_uiautomator(‘new UiSelector().text(“sample”)’) with an EC wait until element is visible (something like WebDriverWait(self.driver2,3000).until(EC.visibility_of_element_located((By.XPATH, “//android.widget.TextView[@text=‘sample’]”))))

I just want to look for a specific text on screen for 3000 seconds using find by uiautomator…

Use EC.visibility_of_element_located right before your find_element_by_android_uiautomator call. Two separate statements. Google has been doing a good job and uiautomator by itself alone handles element wait well. So if your screen is dynamic/complicated/long, then I suggest using EC.

I’m not sure exactly what you mean…

Same issue is occurring with the above I was using…

File “/Users/cgra0005/Desktop/MCT/MCT/18.2-AND_Performance.py”, line 369, in test_performance
element = wait.until(EC.invisibility_of_element_located((By.ID, “com.sample:id/ellipsisImageView”)))
File “/Library/Python/2.7/site-packages/selenium/webdriver/support/wait.py”, line 71, in until
value = method(self._driver)
File “/Library/Python/2.7/site-packages/selenium/webdriver/support/expected_conditions.py”, line 266, in call
return _element_if_visible(_find_element(driver, self.locator), False)
File “/Library/Python/2.7/site-packages/selenium/webdriver/support/expected_conditions.py”, line 402, in _find_element
raise e
WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: java.lang.IllegalStateException: Cannot perform this action on a sealed instance.
at android.view.accessibility.AccessibilityNodeInfo.enforceNotSealed(AccessibilityNodeInfo.java:2992)
at android.view.accessibility.AccessibilityNodeInfo.setConnectionId(AccessibilityNodeInfo.java:2875)
at android.view.accessibility.AccessibilityInteractionClient.finalizeAndCacheAccessibilityNodeInfo(AccessibilityInteractionClient.java:817)
at android.view.accessibility.AccessibilityInteractionClient.finalizeAndCacheAccessibilityNodeInfos(AccessibilityInteractionClient.java:835)
at android.view.accessibility.AccessibilityInteractionClient.findAccessibilityNodeInfoByAccessibilityId(AccessibilityInteractionClient.java:308)
at android.view.accessibility.AccessibilityInteractionClient.getRootInActiveWindow(AccessibilityInteractionClient.java:165)
at android.app.UiAutomation.getRootInActiveWindow(UiAutomation.java:479)
at io.appium.uiautomator2.model.internal.CustomUiDevice.getWindowRoots(CustomUiDevice.java:211)
at io.appium.uiautomator2.model.internal.CustomUiDevice.findObject(CustomUiDevice.java:87)
at io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:147)
at io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:102)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:56)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:208)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:199)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:764)

Maybe two possibilities. Probably there is something special about this screen that is not allowing Appium to search the element. Or, maybe you are trying to do something in a loop? And you are ending up with a stale state? Hared to tell without looking at your app screen, wider range of your code and screen app source code.

still occurring…

still occurring…please respond