Code unordered when automating submission in codechef using SELENIUM

Code unordered when automating submission in codechef using SELENIUM. The codechef editor has the code that i inserted using selenium code but the code which appears on the editor is shuffled for eg - #include is not at the top but in a different place between the code which makes the submission throwinf error.
code - https://ide.codingblocks.com/s/253379

Hey @LP18Aug0041, sorry for replying you late. Can you please try running your code again from the very first cell. As far as I can see there is no problem in your code. If you still get unordered code, I would request you to please attach the screenshot over here. Also attach the google drive link of your code(After uploading it on google drive). I’ll try running it and debugging the problem.

Hope this helps !
Happy coding :slight_smile:

look this is the problem
screenshot of the problem -

drive lin to the ipynb file https://drive.google.com/file/d/1eLj3Yh0HB7rtoEhmzeZfbEoYq1hTEHFq/view?usp=sharing

Hey, I wanted you to send the link for TEST.cpp file

code for the TEST.cpp file - https://drive.google.com/file/d/1RZn6LZvzdom9P1DqcIQo5A7mCd9ycLUv/view?usp=sharing

Hey @LP18Aug0041, I checked your code many times. Ofcourse there are no mistakes, I spent a lot of time figuring out the problem. The conclusion that I have drawn is that when I tried uploading some other .cpp file, then it was coming in proper format. I would suggest you to try with any other.cpp file once. I hope you get the desired results.

If you still face the same problem, do tell me, I’ll ask the mentor to find out the issue or would help you out in some way or the other !

Hope this helps .
Happy coding :slight_smile:

After removing the indentation and also disabling the Sublime​AStyle​Formatter which i was using in sublime text for formatting the code, the python script was able to put the desired code in the code chef ide.I gues this was a compatibility issue with code chef. Thank you for investing your time to help me solve this problem. Thank you so much Aayush Khurana.

1 Like

It’s a pleasure to help you !

Happy Learning :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.