Nowadays, research has found a strong relationship between genomic status and occurrence of disease. Cancer is one of the most common diseases that leads to a high annual mortality rate worldwide, and the disease's genetic content remains challenging. Detecting driver genes of different cancers could help in early diagnosis and treatment. In this paper, we proposed TOPDRIVER, a network-based algorithm, to detect cancer driver genes in cancers. An initial network was constructed by integrating four different omic datasets: HPRD, NCBI, KEGG, and GTEx. This integration created a gene similarity profile that provided a comprehensive perspective of gene interaction in each subtype of cancer and allocated weights to the edges of the network. The vertex scores were calculated using a gene-disease association dataset (DisGeNet) and a molecular functional disease similarity. In this step, the genes network was jagged and faced with a zero-one gap problem. A diffusion kernel was implemented to smooth the vertex scores to overcome this problem. Finally, potential driver genes were extracted according to the topology of the network, genes overall biological functions, and their involvement in cancer pathways. TOPDRIVER has been applied to two subtypes of gastric cancer and one subtype of melanoma. The method could nominate a considerable number of well-known driver genes of these cancers and also introduce novel driver genes. NKX3-1, KIDINS220, and RIPK4 have introduced for gastrointestinal cancer, UBA3, UBE2M, and RRAGA for hereditary gastric cancer and CIT for invasive melanoma. Biological evidences represents TOPDRIVER's efficiency in a subtype-specific manner.