+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/tools/css-xpath-converter/csstoxpath.d.ts b/src/tools/css-xpath-converter/csstoxpath.d.ts
new file mode 100644
index 00000000..6fc8175d
--- /dev/null
+++ b/src/tools/css-xpath-converter/csstoxpath.d.ts
@@ -0,0 +1,3 @@
+declare module "csstoxpath" {
+ export default function cssToXPath(xpath: string): string;
+}
\ No newline at end of file
diff --git a/src/tools/css-xpath-converter/index.ts b/src/tools/css-xpath-converter/index.ts
new file mode 100644
index 00000000..53785df9
--- /dev/null
+++ b/src/tools/css-xpath-converter/index.ts
@@ -0,0 +1,12 @@
+import { Braces } from '@vicons/tabler';
+import { defineTool } from '../tool';
+
+export const tool = defineTool({
+ name: 'CSS XPath Converter',
+ path: '/css-xpath-converter',
+ description: 'Convert CSS selector to/from XPath expression',
+ keywords: ['css', 'xpath', 'converter'],
+ component: () => import('./css-xpath-converter.vue'),
+ icon: Braces,
+ createdAt: new Date('2024-08-15'),
+});
diff --git a/src/tools/css-xpath-converter/xpath-to-css.d.ts b/src/tools/css-xpath-converter/xpath-to-css.d.ts
new file mode 100644
index 00000000..5fac651c
--- /dev/null
+++ b/src/tools/css-xpath-converter/xpath-to-css.d.ts
@@ -0,0 +1,3 @@
+declare module "xpath-to-css" {
+ export default function xpathToCSS(xpath: string): string;
+}
\ No newline at end of file
diff --git a/src/tools/index.ts b/src/tools/index.ts
index c9003fe8..7b6cc09a 100644
--- a/src/tools/index.ts
+++ b/src/tools/index.ts
@@ -2,6 +2,7 @@ import { tool as base64FileConverter } from './base64-file-converter';
import { tool as base64StringConverter } from './base64-string-converter';
import { tool as basicAuthGenerator } from './basic-auth-generator';
import { tool as emailNormalizer } from './email-normalizer';
+import { tool as cssXpathConverter } from './css-xpath-converter';
import { tool as asciiTextDrawer } from './ascii-text-drawer';
@@ -156,6 +157,7 @@ export const toolsByCategory: ToolCategory[] = [
xmlFormatter,
yamlViewer,
emailNormalizer,
+ cssXpathConverter,
],
},
{