I am very new to Selenium and Eclipse. I have a question (actually 2 questions) about debugging.
- When I am debugging in Eclipse (Version: 2021-06 (4.20.0)), so I do not get visibility of all variables I have defined in the method.
For example, (see the screen shot attached) I have added string variable testSigned and assigned a value to it. Actually the purpose is to verify the text value contained in web element table_AdditionalDocumentation.
I defined Toggle Line breakpoint at line 395.
I started to execute in debug mode, got to the line 395.
However, I do not see the value of testSigned in Variables tab.
I noticed it does show values only of the variable which would be returned by the method, correct me if I am wrong.
Please, tell me how to get those values I have defined visible.
2.Additionally, please, let me know which button to press if for example after line 395 I want not to go line by line (F6), but just to run the code to the end.
CodePudding user response:
For the first question, I'm not certain, but it might be because you haven't initialized that variable with a value. Try setting it to an empty string on the declaration line.
For the second question, if you set a breakpoint on the line you want to get to, just Resume (F8), and it will stop at the next breakpoint it hits, hopefully the one at the end of your method. Alternatively, if you just want to stop at the line right after the method returns (which will show the return value), you can click "Step Out" (F7) for that.