Hi Team,
In my app, I am trying to automate the registering process through Facebook.
when I click on “Continue with Facebook” in my emulator/simulator, this is the first screen I get
Though I am able to inspect the elements present here and the xpath for "Allow only essential cookies" is //*[@id="u_0_l_vY"]
, I cannot able to click on it. Below is the error:
[0-1] 2022-06-16 11:49:26.604 INFO [src/pageObjects/common.page.ts:71 switchContextInApp] Switched to WEBVIEW_chrome
[0-1] 2022-06-16T11:49:26.605Z INFO webdriver: COMMAND findElement("xpath", "//*[@id="u_0_l_vY"]")
[0-1] 2022-06-16T11:49:26.605Z INFO webdriver: [POST] http://localhost:4723/session/7a31aaa3-cee2-4c6b-a50a-321ce34de556/element
[0-1] 2022-06-16T11:49:26.605Z INFO webdriver: DATA { using: 'xpath', value: '//*[@id="u_0_l_vY"]' }
[0-1] 2022-06-16T11:49:26.674Z INFO webdriver: RESULT {
[0-1] error: 'no such element',
[0-1] message: 'no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="u_0_l_vY"]"}\n' +
[0-1] ' (Session info: chrome=91.0.4472.114)\n' +
[0-1] ' (Driver info: chromedriver=91.0.4472.101 (af52a90bf87030dd1523486a1cd3ae25c5d76c9b-refs/branch-heads/4472@{#1462}),platform=Mac OS X 12.4.0 arm64)',
[0-1] stacktrace: 'NoSuchElementError: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="u_0_l_vY"]"}\n' +
[0-1] ' (Session info: chrome=91.0.4472.114)\n' +
[0-1] ' (Driver info: chromedriver=91.0.4472.101 (af52a90bf87030dd1523486a1cd3ae25c5d76c9b-refs/branch-heads/4472@{#1462}),platform=Mac OS X 12.4.0 arm64)\n' +
[0-1] ' at errorFromMJSONWPStatusCode (/Users/integration-tests/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:764:12)\n' +
[0-1] ' at ProxyRequestError.getActualError (/Users/integration-tests/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:661:14)\n' +
[0-1] ' at asyncHandler (/Users/integration-tests/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:373:25)'
[0-1] }
Can someone please suggest what can be done to achieve this test step?