I've never driven in Europe, but ViaMichelin seems to be the go-to website for routes and driving-time estimates. The partly-inland route it suggests for your trip is estimated at 3 hr. 40 min. You'd need to add time for stops, traffic, getting lost, finding parking, etc. The coastal route--which I forced VM to cough up by saying I wanted to go through Podgora and Dugi Rat, is estimated at a bit over 5 hours. One imagines traffic could be much more of an issue along the coast, but in late October, who knows?
If you take a look at VM's default route and zoom in a bit, you can see that the road along the coast is highlighted in light green. That means VM considers it especially scenic. I'd ask for local opinions about how long the drive might take; it seems like it would be worth quite a bit of extra time.
Be sure you know how much, if anything, your car-rental company is going to charge you for driving across the unavoidable bit of Bosnia-Hercegovina.