Intermittent NoSuchElementError While Using Page Object APIs - Seeking Advice #1572
Replies: 2 comments 5 replies
-
Hello, thank you for reaching out! First of all, a code looks pretty clean, which is great. Firstly, It would be nice to also attach the screenshot in which state the test failed. The ExTester is doing this screenshot automatically in Next thing, could you please double check you have correct settings set up for tests to be able to use these dialogs? (see Using dialogs) anyway, first of all I would try to increase a bit the timeout for inputbox, which can be easily done on lines
if not working, maybe try to add static wait after it, it means something like
Last thing, I don't know precisely your use-case but if you do not specifically open folder through UI steps.. you can use simpler way which will open for you VS Code instance with desired workspace in one line (see Opening files/folders). In your case it could looks eg:
|
Beta Was this translation helpful? Give feedback.
-
Attached screenshots and log for your reference hope this log is enough to find the issue.. |
Beta Was this translation helpful? Give feedback.
-
I'm facing a NoSuchElementError intermittently when automating the opening of a project folder using Page Object APIs. The error occurs randomly while attempting to locate an element with the CSS selector .monaco-inputbox. Here's the error I'm receiving:
A sample method which I am using
My Current Workaround:
I’ve tried waiting for the .monaco-inputbox element using an explicit wait in a beforeEach() hook, but the issue still occurs intermittently:
P.S : I am a rookie :(
Beta Was this translation helpful? Give feedback.
All reactions