شعار Rf Selenium

Rf Selenium

المجتمع
manykarim
rf-selenium

Use first, before answering, for RF web tests with SeleniumLibrary. Not installs/drivers: rf-setup.

نظرة عامة

الناشرmanykarim
المستودعrobotframework-agentskills
اسم المهارةrf-selenium
النجوم
40
التفريعات
2
الملفات المرفقة
9
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 9

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها manykarim على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Rf Selenium في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-selenium
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/manykarim/robotframework-agentskills.git /tmp/robotframework-agentskills
mkdir -p .claude/skills
cp -r /tmp/robotframework-agentskills/plugins/rf-agentskills/skills/rf-selenium .claude/skills/rf-selenium
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Rf Selenium في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Rf Selenium تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Rf Selenium بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

SeleniumLibrary Skill

Web UI tests through Selenium WebDriver. Unlike Browser Library, element keywords do not wait: every dynamic step needs an explicit wait. Use this skill for suites that already import SeleniumLibrary or need Selenium Grid; for new web tests with no library chosen, use rf-browser. Verified against SeleniumLibrary 6.8.0, Robot Framework 7.4.

When to use

Load this skill first, before exploring the project or answering from memory, when a Robot Framework web UI test uses SeleniumLibrary (Library SeleniumLibrary, Selenium WebDriver):

  • writing or fixing a SeleniumLibrary test: browser options, id:/css:/xpath: locators, explicit waits, hover menus, frames, windows, alerts, JavaScript;
  • a WebDriver exception in a robot run (element not found, click intercepted, stale element), or the user mentions SeleniumLibrary, WebDriver, chromedriver or Selenium Grid.

Not this skill: Browser Library/Playwright suites, or new web tests with no library chosen, use rf-browser; installing SeleniumLibrary or a driver uses rf-setup.

Installation

Install into the project environment (see rf-setup for uv/venv/Poetry, CI and troubleshooting; follow the project's existing tool):

bash
uv add robotframework-seleniumlibrary

A real browser (Chrome, Firefox, Edge) must be installed; Selenium Manager (bundled with Selenium ≥ 4.6) fetches the matching driver on first use. No driver downloads or PATH setup. Offline/air-gapped machines: see rf-setup.

Import and defaults

robotframework
*** Settings ***
Library           SeleniumLibrary    timeout=10s    implicit_wait=0s
Suite Setup       Open Browser    ${BASE_URL}    headlesschrome
Suite Teardown    Close All Browsers
  • timeout=10s raises the 5 s default of the Wait Until … and alert keywords, because CI pages load slower than local ones.
  • implicit_wait=0s (the default) keeps element lookups fast and explicit; waits are written as Wait Until … steps.
  • run_on_failure stays at its default, Capture Page Screenshot, so every failing SeleniumLibrary keyword leaves a screenshot in the log.
  • Open Browser with headlesschrome (or chrome locally) lets Selenium Manager resolve the driver.

Use options= (for example options=add_argument("--window-size=1920,1080")), remote_url= for Selenium Grid, or Create Webdriver when you need browser flags, a grid or a custom driver service — see references/browser-setup.md.

Which keyword for which situation

SituationUseDetails
Click, type, selectClick Element, Input Text, Input Password, Select From List By Label — after a wait if the element appears latereferences/locators.md
Element appears after navigation or AJAXWait Until Element Is Visible, Wait Until Page Contains Elementreferences/waiting-strategies.md
Spinner or dialog must go awayWait Until Element Is Not Visiblereferences/waiting-strategies.md
Button becomes clickableWait Until Element Is Enabledreferences/waiting-strategies.md
Assert text that loads lateWait Until Element Contains, Wait Until Page Containsreferences/waiting-strategies.md
Assert a state that is already settledElement Text Should Be, Element Should Be Visible, Title Should Be—
Wait for a count or any custom conditionWait Until Keyword Succeeds + Get Element Countreferences/waiting-strategies.md
Element inside an iframeSelect Frame … Unselect Framereferences/frames-windows.md
Popup window or new tabSwitch Window NEW, back with Switch Window MAINreferences/frames-windows.md
JavaScript alert or confirmHandle Alertreferences/frames-windows.md
File uploadChoose File on the <input type="file">—
Something no keyword coversExecute Javascript with ARGUMENTSreferences/javascript-execution.md
Extra evidence for a failureCapture Element Screenshot, Log Sourcereferences/troubleshooting.md

Keyword names and arguments: robotcode doc keywords SeleniumLibrary "wait until" lists them; there is no keyword catalog in this skill.

Agent workflow

  1. Look up each keyword before you use it: robotcode doc keyword SeleniumLibrary "<Keyword>"; find names with robotcode doc keywords SeleniumLibrary "<text>". Copy names and arguments exactly as robotcode shows them.
  2. Write the test with the defaults above and the decision table.
  3. Check the changed files statically: robotcode analyze code <changed files> (through the project environment, e.g. uv run robotcode …). Fix every error it reports.
  4. Run them by longname: robotcode robot -bl "<Suite.Sub.Test>" (longnames from robotcode discover tests), or pass a whole directory. Don't pass a single .robot file: it skips the parent __init__.robot.
  5. Read the results: robotcode results show --failed, then robotcode results log -bl "<longname>". Don't parse output.xml by hand.
  6. Fix the cause and go back to step 3 (static check). Stop when the tests pass or the failure is shown to be in the system under test, and say which.

Locator rules

  • A locator without a prefix matches the id or name attribute (some keywords add more, e.g. Click Link also matches link text and href).
  • A locator starting with // (or (//) is XPath; everything else needs an explicit strategy: css:, xpath:, link:, partial link:, class:, tag:, data:.
  • Prefer id:/css: with stable attributes (css:[data-testid="save"]); XPath for text matches only: xpath://button[normalize-space()="Save"].
  • Keep locators in variables, never stored WebElements (see Gotchas).

Gotchas

  • Element keywords do not wait — Click Element, Input Text and Get Text fail at once when the element is not there yet, because implicit_wait defaults to 0 and the import timeout applies only to Wait … and alert keywords. Put a Wait Until Element Is Visible (or … Is Enabled) before acting on anything that loads late.
  • Assertions check once — Page Should Contain, Element Should Be Visible and Element Text Should Be do not retry. After navigation or AJAX use Wait Until Page Contains, Wait Until Element Is Visible or Wait Until Element Contains.
  • Page Should Contain leaves the frame — it searches all frames and resets the selection to the main frame, because of how it walks frames. Call Select Frame again before the next locator inside the iframe.
  • Select Frame is sticky — every later locator is resolved inside that frame until Unselect Frame, so a main-page element then fails with "element not found", not with a frame error. Pair each Select Frame with Unselect Frame.
  • Headless browser names have no underscore — Open Browser accepts headlesschrome and headlessfirefox; headless_chrome fails with "is not a supported browser", and there is no headless Edge name. For headless Edge use edge with options=add_argument("--headless=new").
  • Open Browser defaults to Firefox — the browser argument defaults to firefox, so a call without it fails on machines that only have Chrome. Always pass the browser (e.g. from a ${BROWSER} variable).
  • Implicit plus explicit waits — setting implicit_wait (or Set Selenium Implicit Wait) makes every lookup block for up to that time, also inside the polling loop of Wait Until … keywords, so waits overshoot their timeout and absence checks such as Wait Until Page Does Not Contain Element slow down. Keep implicit_wait=0s and use explicit waits.
  • Stale WebElements — a ${el}= Get WebElement … stored before the page re-renders raises StaleElementReferenceException later, because Selenium element references die with the DOM node. Pass locator strings and look elements up again.
  • Covered elements — Click Element on an element under an overlay or cookie banner fails with ElementClickInterceptedException. Wait for the overlay with Wait Until Element Is Not Visible, or use Scroll Element Into View; a JavaScript click is the last resort because it skips the user-visible check.
  • Screenshot teardowns are redundant — run_on_failure already runs Capture Page Screenshot when a SeleniumLibrary keyword fails; a Capture Page Screenshot teardown only duplicates it. Change the behaviour with the run_on_failure import argument or Register Keyword To Run On Failure.

When to read the references

ReadWhen
references/browser-setup.mdyou need browser options, window size, Selenium Grid (remote_url), Create Webdriver, or CI flags
references/waiting-strategies.mda test is flaky, you need a count or custom wait, or you tune timeouts
references/locators.mda locator does not match, or you need chaining, Add Location Strategy or WebElement arguments
references/frames-windows.mdthe page uses iframes, popups, new tabs or alerts
references/javascript-execution.mdno keyword does what you need and you want Execute Javascript / Execute Async Javascript
references/troubleshooting.mdyou have an error message (stale element, click intercepted, session not created, no such frame) or need screenshots and page source

Examples in assets/examples/: basic-web-test.robot (navigation, forms, assertions), wait-patterns.robot (explicit waits, count wait), multi-window.robot (windows, frames, alerts).

Companion Skills

NeedSkill
Web UI tests with Browser Library (Playwright)rf-browser
Install Robot Framework or a library, fix the environmentrf-setup
Write tests, suites, user keywords, resources and variables in Robot Framework syntaxrf-language

For running, discovering, keyword documentation, result analysis and debugging with the robotcode CLI, use the robotcode skill of the robotcode plugin (robotcode@robotframework-agent-plugins); the commands above work without it.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة أثناء تحميل المهارة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Rf Selenium؟

Use first, before answering, for RF web tests with SeleniumLibrary. Not installs/drivers: rf-setup.

لماذا تستخدم Rf Selenium على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Rf Selenium عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Rf Selenium في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-selenium. يقرأ TypingMind ملف SKILL.md الخاص بها، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Rf Selenium؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Rf Selenium؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Rf Selenium معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Rf Selenium مجانية؟

نعم. نشرها manykarim على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇