B4J Library Selenium Browser Automation - Create any Robot with Browser

Selenium.jpg


Selenium WebDriver - Mastering Test Automation with Selenium

What is Selenium?
Selenium is an open source automated testing suite for web applications across different browsers and platforms. It is quite similar to HP Quick Test Professional (QTP) only that Selenium focuses on automating web-based applications.

Selenium is not just a single tool but a suite of software's, each catering to different testing needs of an organization.

Based on Selenium WebDrivers, this new Library for B4J can automate browsers and create any robot and get any information from websites.

And you can use with or Without UI



Step 1:
Download the library and dependencies and put in your B4J Library Folder

https://visualnet.ddns.me/vncorp/store




Step 2:
Download the ChromeDriver for your platform.
Can be used on Windows/Linux/MacOSX, just download correct driver for your platform on:

http://chromedriver.chromium.org/downloads

TIP: Inside the samples you already have ChromeDriver.exe for windows


Step 3:
Try the samples


Sample 1: (SampleNasdaq.zip) Open Nasdaq.com website and get the top stocks on market

Sample 2: (SampleOyster.zip) Open UK TLF website for retrieve Oysters card and balance from each one

Check with a few lines of code you can retrieve a table from nasdaq website
B4X:
Dim objSelenium As Selenium
objSelenium.DebugMode = True
objSelenium.Initialize("chromedriver.exe","objSelenium")
objSelenium.Navigate("https://www.nasdaq.com/")
Dim lstElements As List = objSelenium.findElementList("indexTable")
For Each k As String In lstElements
      Log(k)
Next


Check others libraries on:

https://visualnet.ddns.me/vncorp/store
 
Last edited:

catyinwong

Active Member
Licensed User
Longtime User
Selenium.jpg


Selenium WebDriver - Mastering Test Automation with Selenium

What is Selenium?
Selenium is an open source automated testing suite for web applications across different browsers and platforms. It is quite similar to HP Quick Test Professional (QTP) only that Selenium focuses on automating web-based applications.

Selenium is not just a single tool but a suite of software's, each catering to different testing needs of an organization.

Based on Selenium WebDrivers, this new Library for B4J can automate browsers and create any robot and get any information from websites.

And you can use with or Without UI



Step 1:
Download the library and dependencies and put in your B4J Library Folder

http://vnsoft.es/download/b4j/selenium/LibrayB4J_v1.2.0.zip

upload_2019-3-31_3-25-13mini.png



Step 2:
Download the ChromeDriver for your platform.
Can be used on Windows/Linux/MacOSX, just download correct driver for your platform on:

http://chromedriver.chromium.org/downloads

TIP: Inside the samples you already have ChromeDriver.exe for windows


Step 3:
Try the samples


Sample 1: (SampleNasdaq.zip) Open Nasdaq.com website and get the top stocks on market

Sample 2: (SampleOyster.zip) Open UK TLF website for retrieve Oysters card and balance from each one
oyster.jpg




Check with a few lines of code you can retrieve a table from nasdaq website
B4X:
Dim objSelenium As Selenium
objSelenium.DebugMode = True
objSelenium.Initialize("chromedriver.exe","objSelenium")
objSelenium.Navigate("https://www.nasdaq.com/")
Dim lstElements As List = objSelenium.findElementList("indexTable")
For Each k As String In lstElements
      Log(k)
Next


Check others libraries on:


Where can I download the sample? It cannot be found on the webstore.
 

catyinwong

Active Member
Licensed User
Longtime User
Selenium.jpg


Selenium WebDriver - Mastering Test Automation with Selenium

What is Selenium?
Selenium is an open source automated testing suite for web applications across different browsers and platforms. It is quite similar to HP Quick Test Professional (QTP) only that Selenium focuses on automating web-based applications.

Selenium is not just a single tool but a suite of software's, each catering to different testing needs of an organization.

Based on Selenium WebDrivers, this new Library for B4J can automate browsers and create any robot and get any information from websites.

And you can use with or Without UI



Step 1:
Download the library and dependencies and put in your B4J Library Folder

http://visualnet.ddns.me/visualnet/downloads/selenium/LibrayB4J_v1.1.0.zip



Step 2:
Download the ChromeDriver for your platform.
Can be used on Windows/Linux/MacOSX, just download correct driver for your platform on:

http://chromedriver.chromium.org/downloads

TIP: Inside the samples you already have ChromeDriver.exe for windows


Step 3:
Try the samples


Sample 1: (SampleNasdaq.zip) Open Nasdaq.com website and get the top stocks on market

Sample 2: (SampleOyster.zip) Open UK TLF website for retrieve Oysters card and balance from each one

Check with a few lines of code you can retrieve a table from nasdaq website
B4X:
Dim objSelenium As Selenium
objSelenium.DebugMode = True
objSelenium.Initialize("chromedriver.exe","objSelenium")
objSelenium.Navigate("https://www.nasdaq.com/")
Dim lstElements As List = objSelenium.findElementList("indexTable")
For Each k As String In lstElements
      Log(k)
Next


Check others libraries on:

http://visualnet.ddns.me/visualnet/store

Is there a sample code to further proceed with the elements found with findElementList?

For example i want to perform click on the 4th element on the webpage with the same class name. How can i combine obSelenium.findElementbyXpath("//div[...]").get(3) with obSelenium.Click/obSelenium.ClickbyXpath ?
 

ilan

Expert
Licensed User
Longtime User

Attachments

  • lib.zip
    6.1 KB · Views: 211

mcqueccu

Well-Known Member
Licensed User
Longtime User

Anser

Well-Known Member
Licensed User
Longtime User
Do anyone have a copy of this library version 1.2.0 ?
The below-given link is not working

The following functionalities
switch back and forth between iFrames, Switch to Parent Frame, Switch to DefaultContent are missing in this library
B4X:
switchTo().parentFrame()
switchTo().defaultContent()
 
Last edited:
Top