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 6155419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:25:58+00:00 2026-05-23T20:25:58+00:00

I am unable to create a .csv file in php using selenium required for

  • 0

I am unable to create a .csv file in php using selenium required for executing my test case and how to upload the same.

As to run my test case i have to update and upload the .csv file so that same data is not uploaded for each execution.

Thanks to all in advance

  • 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-05-23T20:25:58+00:00Added an answer on May 23, 2026 at 8:25 pm

    Use following PHP Code to create a csv file dynamically and give the file to the script to Upload.

    $value is an array with the values comma seprated to be written in csv file per line.

    $output is an array of values so that it put the values on newline.

    ran is creaing numbers and name randomly. The file will be created in the base directory.

    for($i=0;$i<5;$i++)
    {
        $temp1=$obj->ran($fixNo);
        $temp2=$obj->ran($fixName);
        $value=array($temp1."=".$temp2,$temp1."-1",11+$i);
        $output[$i]=$value;
    }
    $fp = fopen('file.csv', 'w');
    foreach ($output as $fields) {
    fputcsv($fp, $fields);
    }
    fclose($fp);
    print_r($output);
    

    Use the following to upload the file it only works in Firefox.

    $this->type("csv_file", "C:\\file.csv");
    

    For more refrence click here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small script we're using to read in a CSV file containing
I have revoked my active development certificate ,and unable to create a new one,
I have been unable to create a Powershell function that accepts more than one
I have been using a mp3 file in my application for over 3 weeks
I am unable to create a directory using the following program : #include <direct.h>
I have to create a white board in Flash Action Script 3.. I'm unable
I am unable to create an empty solution in Visual Studio. The msdn documentation
I have been unable to receive UDP multicast under VxWorks 5.5. I've joined the
I have been unable to trigger an onselect event handler attached to a <div>
I have checked the whole site and googled on the net but was unable

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.