Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9170453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:01:17+00:00 2026-06-17T16:01:17+00:00

from http://seleniumhq.org/docs/03_webdriver.jsp it shows the following Java sample code (new WebDriverWait(driver, 10)).until(new ExpectedCondition<Boolean>() {

  • 0

from http://seleniumhq.org/docs/03_webdriver.jsp it shows the following Java sample code

(new WebDriverWait(driver, 10)).until(new ExpectedCondition<Boolean>() {
  public Boolean apply(WebDriver d) {
    return d.getTitle().toLowerCase().startsWith("cheese!");
  }
});

Is it possible to write the code above in CFML, maybe with help of CF10’s dynamic proxy?

It would be awesome if we can get CF10’s closure to work with the code sample above, but it doesn’t seem like it’ll work because of the expected Java interface and Java return type, am I correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:01:17+00:00Added an answer on June 17, 2026 at 4:01 pm

    I am not sure which is the better option. But it is possible using a dynamic proxy. Just create a cfc that implements the ExpectedCondition interface:

    component {
        public boolean function apply(Any d) {
            return d.getTitle().toLowerCase().startsWith("cheese!");
        } 
    }
    

    Then create an instance of the proxy and pass it into the constructor of WebDriverWait

    <cfscript>
        driver = createObject("java", "org.openqa.selenium.firefox.FirefoxDriver").init();
        driver.get("http://www.google.com");
    
        by = createObject("java", "org.openqa.selenium.By");
        element = driver.findElement(By.name("q"));
    
        WriteDump("Page title is: "& driver.getTitle());
    
        element.sendKeys(["Cheese!"]);
        element.submit();
    
        conditionProxy = createDynamicProxy("test.ExpectedConditionProxy", ["org.openqa.selenium.support.ui.ExpectedCondition"]); 
        WebDriverWait = createObject("java", "org.openqa.selenium.support.ui.WebDriverWait");
        WebDriverWait.init(driver, 10).until( conditionProxy );
        WriteDump("Page title is: "& driver.getTitle());
    
        driver.quit();
    </cfscript>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I downloaded the selenium-java-2.0a5.zip http://code.google.com/p/selenium/downloads/list and ran the following code: package org.openqa.selenium.example; import org.openqa.selenium.By;
I'm executing the following code import selenium from selenium import webdriver driver = webdriver.Remote(command_executor="http://selenium.server.com:4444/wd/hub",
From http://nodejs.org/api/vm.html : JavaScript code can be compiled and run immediately or compiled, saved,
From http://developer.yahoo.com/yui/docs/YAHOO.util.DataSourceBase.html#method_sendRequest , you can see the oCallback is an object literal with the
From: http://ejohn.org/apps/learn/#2 Function.prototype.bind = function(){ var fn = this, args = Array.prototype.slice.call(arguments), object =
From: http://developers.soundcloud.com/docs/api/tracks#filtering I'm not sure from the docs if this functionality is available. I
This code comes from: http://code.activestate.com/recipes/577090-file-encryption-using-stream-cipher/ import sys import random if len(sys.argv) != 4: print
From reading http://www.scalatest.org/user_guide/using_selenium I'm trying to intergrate selenium & scalatest selenium DSL. Here is
I'm trying to use behat and mink together, reading that link: http://docs.behat.org/cookbook/behat_and_mink.html#method-1-composer and trying
@Grapes([ @Grab(org.codehaus.geb:geb-core:0.7.2), @Grab(org.seleniumhq.selenium:selenium-firefox-driver:2.25.0), @Grab(org.seleniumhq.selenium:selenium-support:2.25.0) ]) import geb.Browser import org.openqa.selenium.firefox.FirefoxDriver Browser.drive { go http://www.asu.edu/ $(li

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.