Re: Remedy Testing Java question

2016-11-23 Thread LJ LongWing
it means exactly what it says, it can't find the 'main' method in your
classbased on what you have provided, it looks vaguely right (there is
a space missing in String[]args) (should be a space between ] and a)but
I assume that's just a typo?

On Tue, Nov 22, 2016 at 6:30 PM, Lockwood, Teresa - OCIO-CTS, Jacksonville
FL <teresa.lockw...@fl.usda.gov> wrote:

> **
>
> Thank you so much LJ!  I have now resolved both errors per your directions
> below.  However, when I Run it now I get a different error *“Error:
> Could not find or load main class mytestpack.OpenIE”.  *Any ideas what
> that means?
>
>
>
> *Terri Lockwood*
>
> Enterprise Applications Test Coordinator
>
> Emagine IT Inc. Working for USDA\OCIO\CTS\GSD\GAMB
>
> United States Department of Agriculture
>
> *Phone:*  (865) 405-2109
>
>
>
> *From:* Action Request System discussion list(ARSList) [mailto:
> arslist@ARSLIST.ORG] *On Behalf Of *LJ LongWing
> *Sent:* Tuesday, November 22, 2016 5:11 PM
> *To:* arslist@ARSLIST.ORG
> *Subject:* Re: Remedy Testing Java question
>
>
>
> **
>
> Terri,
>
> If you are defining a Class, you must define a file named by the same
> name, and there can only be one class per file...so, the line 7 needs to be
> in a file named 'OpenIE.java', and it needs to be the only class definition
> in the file.
>
>
>
> Line 12 is complaining because \ is an 'escape character', but in your
> string you have specified
>
>
>
> *C:\Program Files\Selenium\IEDriverServer_x64_2,53.1\IEDriverServer.exe*
>
>
>
> thus, it is trying to figure out what \P is and \S, etc..so, to use a
> literal backslash, and have it not be an escape character, you need to
> double up on them...so your string needs to look like this
>
>
>
> *C:\\Program
> Files\\Selenium\\IEDriverServer_x64_2,53.1\\IEDriverServer.exe*
>
>
>
> notice that all of them are now doubled?
>
>
>
> On Tue, Nov 22, 2016 at 2:57 PM, Lockwood, Teresa - OCIO-CTS, Jacksonville
> FL <teresa.lockw...@fl.usda.gov> wrote:
>
> **
>
> Hello. I am learning to use Selenium WebDriver to do remedy testing.  I’ve
> created a basic Eclipse Java class and hoping someone here on the list can
> help me troubleshoot.  I’m working on a basic script that will simply open
> a Google webpage using Internet Explorer (IE). (Will be doing the same with
> FireFox later).  I’m getting errors on lines 7 and 12.
>
>
>
> Here is the code:
>
>
>
> 1package mytestpack;
>
> 2
>
> 3Import org.openqa.selenium.By;
>
> 4import org.openqa.selenium.WebDriver;
>
> 5import org.openqa.selenium.ie.InternetExplorerDriver;
>
> 6
>
> 7 *public class OpenIE  {*
>
> 8
>
> 9  public static void main(String[]args) {
>
> 10   //TODO Auto-generated method stub
>
> 11   WebDriver driver;
>
> 12   *System.setProperty(“webdriver.ie.driver”, “C:\Program
> Files\Selenium\IEDriverServer_x64_2,53.1\IEDriverServer.exe”);*
>
> 13   driver=new InternetExplorerDriver();
>
> 14   driver.get(https://google.com;);
>
> 15   }
>
> 16 }
>
>
>
>
>
> *Error on line 7 is “The public type OpenIE must be dfined in its own
> file”*
>
> *Error on line 12 is “Invalid escape sequence (valid ones are \b \t \n \f
> \r \”\’\\)*
>
>
>
> Thank you in advance for your help!
>
>
>
> *Terri*
>
>
>
>
>
>
>
> This electronic message contains information generated by the USDA solely
> for the intended recipients. Any unauthorized interception of this message
> or the use or disclosure of the information it contains may violate the law
> and subject the violator to civil or criminal penalties. If you believe you
> have received this message in error, please notify the sender and delete
> the email immediately.
>
> _ARSlist: "Where the Answers Are" and have been for 20 years_
>
>
>
> _ARSlist: "Where the Answers Are" and have been for 20 years_
> _ARSlist: "Where the Answers Are" and have been for 20 years_
>

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"


Re: Remedy Testing Java question

2016-11-22 Thread Lockwood, Teresa - OCIO-CTS, Jacksonville FL
Thank you so much LJ!  I have now resolved both errors per your directions 
below.  However, when I Run it now I get a different error “Error:  Could not 
find or load main class mytestpack.OpenIE”.  Any ideas what that means?

Terri Lockwood
Enterprise Applications Test Coordinator
Emagine IT Inc. Working for USDA\OCIO\CTS\GSD\GAMB
United States Department of Agriculture
Phone:  (865) 405-2109

From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of LJ LongWing
Sent: Tuesday, November 22, 2016 5:11 PM
To: arslist@ARSLIST.ORG
Subject: Re: Remedy Testing Java question

**
Terri,
If you are defining a Class, you must define a file named by the same name, and 
there can only be one class per file...so, the line 7 needs to be in a file 
named 'OpenIE.java', and it needs to be the only class definition in the file.

Line 12 is complaining because \ is an 'escape character', but in your string 
you have specified

C:\Program Files\Selenium\IEDriverServer_x64_2,53.1\IEDriverServer.exe

thus, it is trying to figure out what \P is and \S, etc..so, to use a 
literal backslash, and have it not be an escape character, you need to double 
up on them...so your string needs to look like this

C:\\Program Files\\Selenium\\IEDriverServer_x64_2,53.1\\IEDriverServer.exe

notice that all of them are now doubled?

On Tue, Nov 22, 2016 at 2:57 PM, Lockwood, Teresa - OCIO-CTS, Jacksonville FL 
<teresa.lockw...@fl.usda.gov<mailto:teresa.lockw...@fl.usda.gov>> wrote:
**
Hello. I am learning to use Selenium WebDriver to do remedy testing.  I’ve 
created a basic Eclipse Java class and hoping someone here on the list can help 
me troubleshoot.  I’m working on a basic script that will simply open a Google 
webpage using Internet Explorer (IE). (Will be doing the same with FireFox 
later).  I’m getting errors on lines 7 and 12.

Here is the code:

1package mytestpack;
2
3Import org.openqa.selenium.By<http://org.openqa.selenium.By>;
4import org.openqa.selenium.WebDriver;
5import 
org.openqa.selenium.ie<http://org.openqa.selenium.ie>.InternetExplorerDriver;
6
7 public class OpenIE  {
8
9  public static void main(String[]args) {
10   //TODO Auto-generated method stub
11   WebDriver driver;
12   System.setProperty(“webdriver.ie.driver”, “C:\Program 
Files\Selenium\IEDriverServer_x64_2,53.1\IEDriverServer.exe”);
13   driver=new InternetExplorerDriver();
14   driver.get(https://google.com;);
15   }
16 }


Error on line 7 is “The public type OpenIE must be dfined in its own file”
Error on line 12 is “Invalid escape sequence (valid ones are \b \t \n \f \r 
\”\’\\)

Thank you in advance for your help!

Terri





This electronic message contains information generated by the USDA solely for 
the intended recipients. Any unauthorized interception of this message or the 
use or disclosure of the information it contains may violate the law and 
subject the violator to civil or criminal penalties. If you believe you have 
received this message in error, please notify the sender and delete the email 
immediately.
_ARSlist: "Where the Answers Are" and have been for 20 years_

_ARSlist: "Where the Answers Are" and have been for 20 years_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"


Re: Remedy Testing Java question

2016-11-22 Thread LJ LongWing
Terri,
If you are defining a Class, you must define a file named by the same name,
and there can only be one class per file...so, the line 7 needs to be in a
file named 'OpenIE.java', and it needs to be the only class definition in
the file.

Line 12 is complaining because \ is an 'escape character', but in your
string you have specified

*C:\Program Files\Selenium\IEDriverServer_x64_2,53.1\IEDriverServer.exe*

thus, it is trying to figure out what \P is and \S, etc..so, to use a
literal backslash, and have it not be an escape character, you need to
double up on them...so your string needs to look like this

*C:\\Program Files\\Selenium\\IEDriverServer_x64_2,53.1\\IEDriverServer.exe*

notice that all of them are now doubled?

On Tue, Nov 22, 2016 at 2:57 PM, Lockwood, Teresa - OCIO-CTS, Jacksonville
FL  wrote:

> **
>
> Hello. I am learning to use Selenium WebDriver to do remedy testing.  I’ve
> created a basic Eclipse Java class and hoping someone here on the list can
> help me troubleshoot.  I’m working on a basic script that will simply open
> a Google webpage using Internet Explorer (IE). (Will be doing the same with
> FireFox later).  I’m getting errors on lines 7 and 12.
>
>
>
> Here is the code:
>
>
>
> 1package mytestpack;
>
> 2
>
> 3Import org.openqa.selenium.By;
>
> 4import org.openqa.selenium.WebDriver;
>
> 5import org.openqa.selenium.ie.InternetExplorerDriver;
>
> 6
>
> 7 *public class OpenIE  {*
>
> 8
>
> 9  public static void main(String[]args) {
>
> 10   //TODO Auto-generated method stub
>
> 11   WebDriver driver;
>
> 12   *System.setProperty(“webdriver.ie.driver”, “C:\Program
> Files\Selenium\IEDriverServer_x64_2,53.1\IEDriverServer.exe”);*
>
> 13   driver=new InternetExplorerDriver();
>
> 14   driver.get(https://google.com;);
>
> 15   }
>
> 16 }
>
>
>
>
>
> *Error on line 7 is “The public type OpenIE must be dfined in its own
> file”*
>
> *Error on line 12 is “Invalid escape sequence (valid ones are \b \t \n \f
> \r \”\’\\)*
>
>
>
> Thank you in advance for your help!
>
>
>
> *Terri*
>
>
>
>
>
>
> This electronic message contains information generated by the USDA solely
> for the intended recipients. Any unauthorized interception of this message
> or the use or disclosure of the information it contains may violate the law
> and subject the violator to civil or criminal penalties. If you believe you
> have received this message in error, please notify the sender and delete
> the email immediately.
> _ARSlist: "Where the Answers Are" and have been for 20 years_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"