This paper proposes a family of logics for reasoning about the dynamic activities and informational attitudes, i.e. the beliefs and knowledge, of agents. The logics are based on a new formalisations and semantics of the test operator of propositional dynamic logic and a representation of actions which distinguishes abstract actions from concrete actions. The new test operator, called informational test, can be used to formalise the beliefs and knowledge of particular agents as dynamic modalities. This approach is consistent with the formalisation of the agents' beliefs and knowledge as K(D)45 and S5 modalities. Properties concerning the preservation of informativeness, truthfulness and belief are proved for a derivative of the informational test operator. It is shown that common belief and common knowledge can be expressed in these logics. As a consequence, these logics are more expressive than propositional dynamic logic with an extra modality for belief or knowledge. However, the logics are still decidable and in 2EXPTIME. Versions of the considered logics express natural additional properties of beliefs or knowledge and interaction of beliefs or knowledge with actions. A simulation of PDL is constructed in one of these extensions.