Giter VIP home page Giter VIP logo

Comments (1)

florentbr avatar florentbr commented on August 31, 2024

MyDriver.setTimeout ("120000")
MyDriver.setImplicitWait (30000)

To set the timeouts:
Dim driver As FirefoxDriver
driver.Timeouts.PageLoad = x
driver.Timeouts.ImplicitWait = x
driver.Timeouts.Script = x
driver.Timeouts.Server = x

Note that ImplicitWait is acivated by default with a 3 second timeout.
I recommend to not change this value and to use a specific timeout on the FinElement when required.
To try to locate an element for 12 seconds:
Set ele = driver.FindElementById("id", 12000)

MyDriver.waitForTitle "Title"

Dim Waiter As New Waiter
While Waiter.Not(driver.Title = "expected"): Wend

MyDriver.waitForText "Text to be present"

driver.FindElementById("id").WaitText "expected"
or
Dim Waiter As New Waiter
Set ele = driver.FindElementById("id")
While Waiter.Not(ele.Text = "expected"): Wend

MyArray(0) = MyDriver.getTable("css=table.name.1.1")

You can use an XPath to retreive a sepecific cell.
To get the third cell on the second row:
txt = driver.FindElementByXPath("table/body/tr[2]/td[3]").Text

You can also pull all the table to an array:
Dim data()
data = driver.FindElementByCss("table").AsTable.data
txt = data(2, 3)

from seleniumbasic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.