Skip to content

DevFatani/Selenium-Java-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

Convert from HTML to Java code object Selenium

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages