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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:55:41+00:00 2026-06-16T05:55:41+00:00

I have the path to my XML file on my computer, but how can

  • 0

I have the path to my XML file on my computer, but how can I use selenium (web automation tool) to inject the XML file ?

Usually how it is done (manually) is navigate to the URL and COPY AND PASTE the entire XML text into the provided text box..

Any ideas how to inject the file using automation ? There is no way to “drag” the XML file to the text box and I believe the way I’m thinking that it will work is very complicated.

  • 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-16T05:55:42+00:00Added an answer on June 16, 2026 at 5:55 am

    I think this is actually what you want –

    File xml = new File("xmlpath");
    
    String url = xml.getAbsolutePath();
    url = url.replace('\\', '/');
    url = url.replace(" ", "%20");
    
    String actual = "file:/" + url;
    
    selenium.open(actual);
    

    Then you should be able to get the xml using String theXML = selenium.getText("//rootxmlnode"); Then do what you will with it.

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

Sidebar

Related Questions

I have a class which loads an xml file using the following: Path.Combine( AppDomain.CurrentDomain.BaseDirectory,
lets say i have an xml file path.xml that goes like this: <paths> <path
I have an xml file in my computer and i want to display this
I have a path $/Folder1/Folder2/Folder3/File.xml I would like to get the path minus File.xml
I have this problem where all URLs like context/path/file/anything/that/follows becomes context/path/file.php/anything/that/follows or context/path/file.xml/anything/that/follows .
I have this path of my xml file: <description> <![CDATA[<p class=image><img width=250 height=83 src=http://www.mydomain.com/picture/pic01.png
I have stored the XML path to items in a string like this: response->items->item
I have a relative path (e.g. foo/bar/baz/quux.xml) and I want to pop a directory
I have xml like this: <configurationData> <path name='b'> <path name='a'> <setting name='s1'> ![CDATA[XXXX]] </setting>
I have some path c:\server\folderName1\another name\something\another folder\ . How i can extract from there

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.