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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:12:18+00:00 2026-06-13T23:12:18+00:00

I apologise if this is a stupid question…. I am trying to create a

  • 0

I apologise if this is a stupid question….

I am trying to create a java application to open a url, run a series of actions on it and then print the page
I can open the page easily, but i have a problem in that the page has a number of twisty like expand boxes. I would like to be able to access these with the java app and expand all of them before printing the document, as not expanding them causes the document to be printed without the details below the expand box.

<P>
<TABLE id=expandTable class=expTable width="100%" count="25">
<TBODY>
<TR class=expTitleMout onmouseover="className='expTitleMin'"      onmouseout="className='expTitleMout'">
<TD class=expTitle onclick=collapse(25,1) vAlign=top width=18><SPAN contentEditable=false width="100%"><IMG id=img_expSection_25 src="images/kms_dt_expand.gif"></SPAN></TD>
<TD class=expTitle onclick=collapse(25,1) width="100%">
<DIV>*****HEADING HERE*****:&nbsp;</DIV></TD></TR>
<TR>
<TD id=expSection_25 class=expDataB colSpan=2>
<UL>
<LI>****** CONTENT HERE *******<BR></LI></UL></A></TD></TR></TBODY></TABLE></P>

I am trying to find out if there is some way to address the script function that expands this text. Looking at it with selenium, selenium gives me a chunk of java code, but i am having major issues installing the selenium plug in for Netbeans.

If anyone has any way for me to create a line of code in Java that will allow me to address these functions and make sure they are expanded I would highly appreciate it. hate to have to ask for help but I have done about 6 hours of research on this by now, and think my Google-Fu is crippled as i can find nothing to help. Please find the script i am using for accessing the url below

package openuri;
import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

/**
 *
 * @author gbreytenbach
 */    
    public class OpenURI {

       public static void main(String[] a) {
           String baseURL = "https://someurl.com/";
           String docID = "SOME SUFFIX";
           String docURL = baseURL+docID;
      try {
      URI uri = new URI(docURL);
      Desktop desktop = null;
      if (Desktop.isDesktopSupported()) {
        desktop = Desktop.getDesktop();
      }

      if (desktop != null)
      {
        desktop.browse(uri);
      }
    } catch (IOException | URISyntaxException ioe) {
    }

    }
}

EDIT: Thanks for the 2 very quick answers. Maybe I should provide more details 😉
the function i am trying to run on the page is a print function that looks as follows:

<td id="print" nowrap="nowrap">
<span id="tbPrint">
<a onclick="return printPage('Published')" href="#">Print</a>
</span>
</td>

Using .doclick, would it allow me to run the print function programmatically?

  • 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-13T23:12:18+00:00Added an answer on June 13, 2026 at 11:12 pm

    Take a look at Watij. I had the same issue of plugins with Selenium and another issue of specifying waitTime for every response. Watij is great in this regards and also provides neat and clean APIs. You might not need to install it’s plugin to an IDE. Just using it’s API in classpath will do.

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

Sidebar

Related Questions

Ok, I'm pretty sure this is a stupid question so I apologise in advance.
This may be a stupid question and if it is then I apologize. I
Apologies if this is a stupid question, I'm relatively new to Matlab. I've got
This is probably a very simple question, I apologise - I'm new to rails.
Before I ask this question I would to apologise because of the fact that
I appreciate this question is a little silly, so I apologise in advance if
My apologies if this is a stupid question, however I can't find any information
First of all, I apologize if this is a stupid question, I'm a dead
Apologies for the massively stupid question but I am curious how to get this
I apologise for what I'm pretty sure is a fairly stupid question, but I

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.