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

  • SEARCH
  • Home
  • 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 8598499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:09:53+00:00 2026-06-12T01:09:53+00:00

Here is my code for Firefox. How to customize it for Chrome and IE?

  • 0

Here is my code for Firefox. How to customize it for Chrome and IE?

can any oneplease let me know.. I am using groovy and selenium web driver only. Since Soap UI supports groovy only, i am trying to do this in Groovy and Web drivers only..

import org.openqa.selenium.By
import org.openqa.selenium.WebDriver
import org.openqa.selenium.WebElement
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.support.ui.ExpectedCondition
import org.openqa.selenium.support.ui.WebDriverWait

         // Create a new instance of the Firefox driver
         WebDriver driver = new FirefoxDriver()

        // Extract URL for stdcheckout
       def link = context.expand( 'url' )

        // And now use this to visit stdcheckout
        driver.get(link)
        //driver.get("https://xxx-ft25.test.xxxx.eu/xxxx/login?partnerCode=xxx&paymentToken=4bbf8ee5-f102-424f-8a6f-28a8e26e0292")

        // Find the text input element by its name
        WebElement element = driver.findElement(By.name("email"))

        // Enter username
        element.sendKeys("1204@yahoo.com")


        //  Find the password element by its name
        WebElement element1 = driver.findElement(By.name("password"))

        // Enter password
        element1.sendKeys("asdfghjkl")

       // Click the Login button    
        driver.findElement(By.name("sbutton")).click();

       // Enter CVV2
       driver.findElement(By.id("cvv")).sendKeys("672");

      //WebElement element2 = driver.findElement(By.name("termsAndConditionsAccepted"))
      //element2.click();

      //click Paynow
      driver.findElement(By.cssSelector("input[type=\"button\"]")).click();


       log.info("Page title is: " + driver.getTitle())

        // Google's search is rendered dynamically with JavaScript.
        // Wait for the page to load, timeout after 10 seconds
        /*(new WebDriverWait(driver, 10)).until(new ExpectedCondition() {
            public Boolean apply(WebDriver d) {
             return d.getTitle().toLowerCase().startsWith("cheese!")
           }
        });*/

        // Should see: "cheese! - Google Search"
        //log.info("Page title is: " + driver.getTitle())

        //Close the browser
        driver.quit()
  • 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-12T01:09:54+00:00Added an answer on June 12, 2026 at 1:09 am

    Download chrome driver and put it in any location and give the path while set the property….

    package korporation.test.SampleTestGroup
    
    import java.util.concurrent.TimeUnit
    
    import org.openqa.selenium.By
    import org.openqa.selenium.WebDriver
    import org.openqa.selenium.chrome.ChromeDriver
    
    
        // set up the driver
        System.setProperty("webdriver.chrome.driver", "c:/chromedriver/chromedriver.exe")
    
        //Define the driver
        def WebDriver driver = new ChromeDriver()
        driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS)
    
         // And now use this to visit Google
        def link = context.expand( 'url'); 
    
         driver.get(link)
    
         def username = context.expand( '${#Project#username}' )
    
         // Find the text input element by its name
         driver.findElement(By.name("email")).sendKeys(username)
    
    
    
         //  Find the password element by its name
         driver.findElement(By.name("password")).sendKeys("asdfghjkl")
    
         // Click the Login button  
         driver.findElement(By.name("sbutton")).click();
    
        // Enter CVV2
        driver.findElement(By.id("cvv")).sendKeys("672");
    
        driver.findElement(By.name("termsAndConditionsAccepted")).click();
    
        driver.findElement(By.xpath("//*[@id=\"pay-now\"]")).click();
    
    
       //log.info("Page title is: " + driver.getTitle())
    
       assert (driver.getTitle()=="Mobile Phones | Contract Phones | Cheap Mobile Phone Deals & SIMs")
       //Close the browser
       driver.quit()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code here which works perfectly in firefox but not in chrome
here is code for regular expression matching #include<iostream> #include<stdio.h> #include<string.h> using namespace std; int
I have this code and in Firefox is working well, but in Chrome I'am
I'm trying to login to https://www.reporo.com/login.php using Curl. Here is code I'm using: <?php
i have some jquery code here that works fine in firefox but when i
The script is on jsfiddle here : CODE What it does at the moment
Ok the error is showing up somewhere in this here code if($error==false) { $query
Here is code my jqgrid editing through form. $(#DataEnergy).jqGrid('navGrid', '#pagergrid', {}, //options {editdata: {
Here my code, I need to insert into mysql database I have mysql,php,android 1)
Here is code from MSDN . I don't understand why the work isn't just

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.