One Nation has claimed victory in the Secret Harbour by-election to win its first ever seat in the Western Australian legislative assembly.