As written the question is ill-posed: class 1 or class 2 is a property of a particular graph, whereas polynomial time is a property of an algorithm applied to an infinite family of graphs.
Patrick Schnider points out in the comments that the first fix to the question doesn't work: if we have a polynomial time algorithm for finding a colouring when it exists, we certainly have a polynomial time algorithm for testing whether a colouring exists.
The deeper question is perhaps this. Suppose we have an efficient algorithm for determining whether a particular structure (such as a colouring of a graph) exists. Can we use the algorithm to find it?
Sometimes the answer is yes. Suppose we have an efficient algorithm for deciding whether a graph is $k$-colourable. Then we can use it to find a $k$-colouring (when it exists) of a graph $G$ as follows. Test each non-edge $e$ of $G$ to see whether $G+e$ is also $k$-colourable. If it is, switch attention to $k$-colouring $G+e$. If it isn't, move on to the next edge. Note that we never have to test an edge more than once, as if $G+e$ is not $k$-colourable then $G+H+e$ is never $k$-colourable either, for any $H$. The end-point of this process is a complete $k$-partite graph, which is easily $k$-colourable.
But sometimes the answer is no, or at least "we don't know yet". Primality testing is in P, so we have an efficient algorithm to detect whether an integer can be factorised. But we don't have an efficient (classical) algorithm to factor integers, and it's not clear that we ever will. If there was a mechanical process to go from existence of objects to providing examples then this would not be such a notoriously difficult problem.