Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 1.72 KB

README.md

File metadata and controls

66 lines (41 loc) · 1.72 KB

Selenium JAVA Generator

Script to convert from HTML to Java Selenium object (WebElement)

SUPPORT

  • Support read HTML from File or URL
  • Support @FindBy(id = "id_element")
  • Support @FindBy(css = "css_element")
  • Build function to click on item
  • You can custom your REGEX pattern

alt-text-1

How to use it 👨🏻‍💻

  • First: Clone the project to your device
   git https://github.com/DevFatani/Selenim-JAVA-Generator.git
  • Second: Run the following command
    ruby user_console.rb
  • Third: You will see message output follow the instructions

  • Forth: Follow the following Youtube video for more information 👇🏻

IMAGE ALT TEXT HERE


Default value can be change

  • Sometimes id or class contain some following words so it will ignore still you can change it
    <!-- <div class="https://....com"> -->

    $array_rules_not_include = ["https://", "about:blank", "_blank", "rel=", "target="]

  • The following REGEX ignore any type that contain special chars
    <!-- <div class="btn[[type]]">  -->
    
    $special_char_to_match = /[!@#$%^&*().?":{}\[\]|<>;]/

  • If you did not specify class JAVA name the default will be
    $java_class_name = "SeleniumJavaGenerator"