AppiumTestDistribution / appium-wait-plugin

Plugin to automatically manage all element waits and enables to write wait-free appium tests.
MIT License
61 stars 11 forks source link

find elements not working for iOS platform it wait for 40 sec #72

Open sushilpawar12 opened 1 year ago

sushilpawar12 commented 1 year ago

[debug] [XCUITestDriver@1a9e (5f06c4da)] Calling AppiumDriver.findElements() with args: ["xpath","//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]","5f06c4da-6fc1-486b-b694-909b33b49e47"] [AppiumDriver@1acc] Plugins which can handle cmd 'findElements': element-wait [AppiumDriver@1acc] Plugin element-wait is now handling cmd 'findElements' [AppiumDriver@1acc] Executing default handling behavior for command 'findElements' [debug] [XCUITestDriver@1a9e (5f06c4da)] Executing command 'findElements' [debug] [XCUITestDriver@1a9e (5f06c4da)] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id, css selector [debug] [XCUITestDriver@1a9e (5f06c4da)] Waiting up to 40000 ms for condition [debug] [XCUITestDriver@1a9e (5f06c4da)] Matched '/elements' to command name 'findElements' [debug] [XCUITestDriver@1a9e (5f06c4da)] Proxying [POST /elements] to [POST http://127.0.0.1:8100/session/BF10DD05-C5BF-413B-8889-FF84AB42A317/elements] with body: {"using":"xpath","value":"//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]"} [debug] [XCUITestDriver@1a9e (5f06c4da)] Got response with status 200: {"value":[],"sessionId":"BF10DD05-C5BF-413B-8889-FF84AB42A317"} [debug] [XCUITestDriver@1a9e (5f06c4da)] Waited for 547 ms so far [debug] [XCUITestDriver@1a9e (5f06c4da)] Matched '/elements' to command name 'findElements' [debug] [XCUITestDriver@1a9e (5f06c4da)] Proxying [POST /elements] to [POST http://127.0.0.1:8100/session/BF10DD05-C5BF-413B-8889-FF84AB42A317/elements] with body: {"using":"xpath","value":"//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]"} [debug] [XCUITestDriver@1a9e (5f06c4da)] Got response with status 200: {"value":[],"sessionId":"BF10DD05-C5BF-413B-8889-FF84AB42A317"} [debug] [XCUITestDriver@1a9e (5f06c4da)] Waited for 1592 ms so far

Appium v - 2.0.0-beta.65 , xcuitest@4.24.2 , element-wait@1.3.0

saikrishna321 commented 1 year ago

What is the error? Please give full logs

sushilpawar12 commented 1 year ago

when we are using iOS predicate & iOS class chain locator to find element or find elements then wait plugin is not working @saikrishna321

saikrishna321 commented 1 year ago

Give full logs please to check whats wrong. @sushilpawar12

sushilpawar12 commented 1 year ago

Hi @saikrishna321

Sorry for the delay .. While using find elements in framework again it find elements till 40 seconds

[HTTP] {"using":"xpath","value":"//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]"} [debug] [XCUITestDriver@d475 (2b09d1e1)] Calling AppiumDriver.findElements() with args: ["xpath","//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]","2b09d1e1-1b3f-42d3-bc5f-8e20909aac16"] [AppiumDriver@2b6d] Plugins which can handle cmd 'findElements': element-wait [AppiumDriver@2b6d] Plugin element-wait is now handling cmd 'findElements' [AppiumDriver@2b6d] Executing default handling behavior for command 'findElements' [debug] [XCUITestDriver@d475 (2b09d1e1)] Executing command 'findElements' [debug] [XCUITestDriver@d475 (2b09d1e1)] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id, css selector [debug] [XCUITestDriver@d475 (2b09d1e1)] Waiting up to 40000 ms for condition [debug] [XCUITestDriver@d475 (2b09d1e1)] Matched '/elements' to command name 'findElements' [debug] [XCUITestDriver@d475 (2b09d1e1)] Proxying [POST /elements] to [POST http://127.0.0.1:8100/session/89AAE85B-1E15-43F3-A1FA-48B6E31BC8E4/elements] with body: {"using":"xpath","value":"//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]"} [debug] [XCUITestDriver@d475 (2b09d1e1)] Got response with status 200: {"value":[],"sessionId":"89AAE85B-1E15-43F3-A1FA-48B6E31BC8E4"} [debug] [XCUITestDriver@d475 (2b09d1e1)] Waited for 470 ms so far [debug] [XCUITestDriver@d475 (2b09d1e1)] Matched '/elements' to command name 'findElements' [debug] [XCUITestDriver@d475 (2b09d1e1)] Proxying [POST /elements] to [POST http://127.0.0.1:8100/session/89AAE85B-1E15-43F3-A1FA-48B6E31BC8E4/elements] with body: {"using":"xpath","value":"//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]"} [debug] [XCUITestDriver@d475 (2b09d1e1)] Got response with status 200: {"value":[],"sessionId":"89AAE85B-1E15-43F3-A1FA-48B6E31BC8E4"} [debug] [XCUITestDriver@d475 (2b09d1e1)] Waited for 1403 ms so far [debug] [XCUITestDriver@d475 (2b09d1e1)] Matched '/elements' to command name 'findElements' [debug] [XCUITestDriver@d475 (2b09d1e1)] Proxying [POST /elements] to [POST http://127.0.0.1:8100/session/89AAE85B-1E15-43F3-A1FA-48B6E31BC8E4/elements] with body: {"using":"xpath","value":"//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]"} [debug] [XCUITestDriver@d475 (2b09d1e1)] Got response with status 200: {"value":[],"sessionId":"89AAE85B-1E15-43F3-A1FA-48B6E31BC8E4"} [debug] [XCUITestDriver@d475 (2b09d1e1)] Waited for 2356 ms so far [debug] [XCUITestDriver@d475 (2b09d1e1)] Matched '/elements' to command name 'findElements' [debug] [XCUITestDriver@d475 (2b09d1e1)] Proxying [POST /elements] to [POST http://127.0.0.1:8100/session/89AAE85B-1E15-43F3-A1FA-48B6E31BC8E4/elements] with body: {"using":"xpath","value":"//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]"} [debug] [XCUITestDriver@d475 (2b09d1e1)] Got response with status 200: {"value":[],"sessionId":"89AAE85B-1E15-43F3-A1FA-48B6E31BC8E4"} [debug] [XCUITestDriver@d475 (2b09d1e1)] Waited for 3144 ms so far [debug] [XCUITestDriver@d475 (2b09d1e1)] Matched '/elements' to command name 'findElements' [debug] [XCUITestDriver@d475 (2b09d1e1)] Proxying [POST /elements] to [POST http://127.0.0.1:8100/session/89AAE85B-1E15-43F3-A1FA-48B6E31BC8E4/elements] with body: {"using":"xpath","value":"//XCUIElementTypeButton[contains(@name,'Heart') and contains(@name,'selected')]"}

Appium v - 2.0.0-beta.66 , xcuitest@4.24.3 , element-wait@1.3.0

saikrishna321 commented 1 year ago

@sushilpawar12 This is not full logs. Please provide full server logs as gist

sushilpawar12 commented 1 year ago

Hi @saikrishna321 sorry for the delay . In logger file you can find text - "Please check below logs for reference" where below logs will be helpfull. op.txt

saikrishna321 commented 1 year ago

@sushilpawar12 hard to read these logs. Please provide as gist