There are no built-in conditional expressions that tell you if the FrameworkType project is as specified in the .dproj, VCL, or FMX file. As far as I know, you cannot include this setting in the code. Remember also that it is quite possible, although, of course, not the main one, to have an application that uses both VCL and FMX. This is really not a condition.
Therefore, I recommend that you declare your own conditional definition, which controls whether you are using a GUI runner or a text runner.
In fact, you apparently already have some kind of mechanism for this. You are dialing the code with the unit GUITestRunner . This means that it must be in uses in the same file as the code in the question. How do you conditionally include a GUITestRunner in a uses clause?
Note. The same question was asked on the Embarcadero forums: https://newsgroups.embarcadero.com/message.jspa?messageID=400077
source share