Keyword Test not working the second time
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Keyword Test not working the second time
Hello,
The application I am testing is a web application. I have a Keyword Test that runs successfully the first time but the second time it is always in error. Basically what my test does:
1- Click on the input text field
2- Do a "Ctrl + a"
3- Make a "Delete"
4- Enter new text
What I seem to notice is that the click on my field no longer works after the first time. So the "Ctrl + a" and all the rest either.
What I have tried to try to fix the problem:
1- I validate if my field exists and it returns True
2- I put some "Delay" before each operation but that doesn't change anything
3- I configured "auto-wait" property on operations and that doesn't change anything
4- Add an operation to put the focus on my field before the clic
5- I tried to put several "Click" operation in a row and it doesn't work either
I'm really out of ideas.
Help please!
Thank you.
Katherine
Solved! Go to Solution.
- Labels:
-
Keyword Tests
-
Test Results
-
Test Run
-
Web Testing
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would try recording a test that performs these steps two or three times in a row, then see what code TestComplete generates for you. There may be a clue in that generated code.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you share what the error message is?
--------------------
Senior SQA Automation Engineer
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a checkpoint that compares (after the save), the value in the field after the change with the value passed by a parameter and it failed because the change has not been made. But there is no error on the "Click", or "Ctl + A" or "Delete". When I run it, I can see that nothing is happening on the screen.
The "True" value that you see on the second line is the check that I'm doing to verify that the item exists.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Marsha_R ,
I've tried 3 different recordings and the they all have different results !!!
The recording is very slow since yesterday. I've tried closing everything and rebooting my computer but it's still slow.
1- The first recording, has recorded the "Click" and the "Ctrl + a" operations but not the "[Del]" one.
2- The second recording has just recorded the Click operation. Not the "Ctrl + a" and not the "[Del]" operations.
3- The third recording has recorded a "Click" and a "SetText" operations. No "Ctrl + a" and no "[Del]" operations.
Usually, I don't use anymore the "SetText" operation because it's not available most of the time even on items that are exactly the same type. I search the web regarding this and I read that you should use the "Keys" operation that is safer.
Thanks !
Katherine
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I have found my problem. I thought I didn't need the "Navigate" operation at the start of a Keyword Test, if my browser was already open to the desired page. So I removed it from my test if my functionality had several Keyword Tests that I ran successively. Until now it was working. But I see that when I run the same test 2 times in a row, the second time doesn't work if I don't have the "Navigate" operation.
I'm a new user of TestComplete. It won't be my last mistake 😋
Thanks for your responses !
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yay, glad you figured it out!
Yes, Navigate turns out to be kind of like Set Focus. Better to have it there just in case.
You're right about using Keys, although occasionally I have run into a spot where Set Text worked out better.
We will be here for more questions, any time!
