Jacrac04 / DFM-Bot

A Bot for drfrostmaths.com
19 stars 13 forks source link

Answer partially completed #9

Closed Oliver-Johnson closed 3 years ago

Oliver-Johnson commented 3 years ago

Describe the bug Going through a page and, the answer for a question should be 1 + theta, However the Bot inputs 1 + heta May this be anything to do with the \t causing a tab to be done rather than typing 't'. I haven't delved into the code much but this looks like the answers aren't being stripped fully before input

Screenshots image image

Additional context After getting it wrong it seems to go a bit weird failing to answer Q4 and not even reaching Q5. *I set it to auto input 5 questions Congrats on the code though!

Oliver-Johnson commented 3 years ago

https://www.drfrostmaths.com/do-question.php?aaid=23128321&qnum=2 I'm not sure if this link may work but just thought I'd add it incase it could help in any way. (Link for the problematic question)

Oliver-Johnson commented 3 years ago

Tried again on some similar questions and had a similar result: image

Jacrac04 commented 3 years ago

HI @Oliver-Johnson! The problem I think is to do with how python handles backslashes (because they are the escape character in python) I had just been adding more and more replaces for each thing like \\pi or \\right to it because for some reason I couldn't get .replace('\\', "\\\\") to work, however I have found a fix for this which I will release in an update today or tomorrow.
It didn't answer Q5 as it got some wrong, so it does it again as Dr Frost gives you multiple chances to get it right and that is included in the 5 questions to answer. Is it possible to get the topic name so I can test it? Many thanks, Jacob

Oliver-Johnson commented 3 years ago

Hello @Jacrac04 Yeah, I've encountered problems with backslashes in some of my selenium webdriver projects I've done. Its great you've found a fix for that though. The topic name was Hyperbolic functions: image I selected all of the subsections so I'm not entirely sure which bit it was exactly. *edit looking back at the question its likely to be the E283 one

Jacrac04 commented 3 years ago

Hi @Oliver-Johnson, Thanks for your help. I have fixed it in this commit. I want to make a few other changes and I will then create a release. I'll mark this as closed once I merge the changes to main. Feel free to star this is you like the project. Many thanks, Jacob

Jacrac04 commented 3 years ago

Fixed in this release.