Right, but it's a separate crime than actually doing it, and from what I understand, the law does not separate these two in this case. The law treats it as if they were chatting to an actual child, which they weren't.
If they thought they were selling illegal drugs but they were just selling sugar they would be convicted. (In England if you sell sugar as illegal drugs you will be convicted of a drugs offence even if you know you are selling pure sugar).