In a very general sense:
Have your enemies raycast toward the player.
If the player is hit with the raycast, store the x,y location of the player in that enemy's instance variables and shoot.
If the raycast then misses the player, have them move toward the x,y location and raycast again.
If that raycast misses, you can have them start wandering around and searching or return to their original location.