As per the HTML you have shared the
with text as Postal code is a child node of the
<div> tag with class attribute as q_codePostal.
What went wrong?
As per your code trial you have used:
WebElement detailPostCode = driver.findElement(By.xpath("//label[@for='q_codePostalDetailAU']"));
In this expression
//label[@for='q_codePostalDetailAU'] will always refer to the descending
<input> tag with
id attribute as q_codePostalDetailAU. Hence your code trial didn't work.
As an alternative you can use the following solution:
WebElement detailPostCode = driver.findElement(By.cssSelector("div.q_codePostal>label"));