Hi @Abdul_Sathar_Beigh,
I appreciate your response. Would like to inform that I ran my script again & it seems after the unlock black screen it launches the .apk, I checked it after unlocking my phone and the application was my current focus. I read through appium logs and below is that error
info: [debug] [BOOTSTRAP] [debug] Emitting system alert message
info: [debug] Emitting alert message...
info: --> POST /wd/hub/session/a5f78020-e39d-461a-8eef-5530ed79b745/element {"using":"id","value":"com.ebay.mobile:id/button_sign_in"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"com.ebay.mobile:id/button_sign_in","context":"","multiple":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"com.ebay.mobile:id/button_sign_in","context":"","multiple":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding com.ebay.mobile:id/button_sign_in using ID with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.ebay.mobile:id/button_sign_in]
info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
info: [debug] [BOOTSTRAP] [debug] Finding com.ebay.mobile:id/button_sign_in using ID with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.ebay.mobile:id/button_sign_in]
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":7,"value":"No element found"}
info: [debug] Condition unmet after 1009ms. Timing out.
info: [debug] Responding to client with error: {"status":7,"value":{"message":"An element could not be located on the page using the given search parameters.","origValue":"No element found"},"sessionId":"a5f78020-e39d-461a-8eef-5530ed79b745"}
info: <-- POST /wd/hub/session/a5f78020-e39d-461a-8eef-5530ed79b745/element 500 1014.754 ms - 195
info: [debug] Didn't get a new command in 60 secs, shutting down...
info: Shutting down appium session
Below is my code that would run after the app launch, now surprisingly this code runs fine if I manually unlock my phone first and then run the script. Please let me know if I need to focus first through any code block so that findelement and click function will run without any error.
WebElement signInButton = driver.findElementById("com.ebay.mobile:id/button_sign_in");
signInButton.click();
Please let me know if I am missing any step.
Thanks,
Manish Sharma