Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    reg: Selenium library files

    As you mentioned in the document, I can find the webDriver.jar in the below mentioned path. But I couldn't find anywhere. So, Please let me know where can i find below jar.

    Could you please let me know whether the below classes are available in the same jar file.

    import com.isomorphic.webdriver.ByScLocator;
    import com.isomorphic.webdriver.SmartClientFirefoxDriver;

    Code:
    These classes are packaged in the library isomorphic_webriver.jar, which can be found in WEB-INF/lib-WebDriverSupport (along with several 3rd-party supporting libraries).
    SmartClient version : Isomorphic SmartClient/SmartGWT Framework (9.1p_2014-09-04/PowerEdition Deployment 2014-09-04)

    Thanks in advance.

    #2
    The 2014-09-04 downloads are no longer available, but in the 2014-09-07 downloads for PowerEdition, the location of isomorphic_webdriver.jar is:

    SmartClient 9.1p:
    ./smartclientSDK/WEB-INF/lib-WebDriverSupport/isomorphic_webdriver.jar

    SmartGWT 4.1p:
    ./lib-WebDriverSupport/isomorphic_webdriver.jar

    Comment


      #3
      Thanks for the reply and I am able to find the libraries. But While running my first test case I have some doubts.

      I am using the below code to run the testcase. But I am getting the below error.

      Code:
       Caused by: org.openqa.selenium.WebDriverException: isc is not defined
      I have written my test like below:

      Code:
       package automation;
      
      import org.openqa.selenium.By;
      import org.openqa.selenium.WebElement;
      
      import com.isomorphic.webdriver.ByScLocator;
      import com.isomorphic.webdriver.SmartClientFirefoxDriver;
      
      public class FirstTestCase {
      
      	
      	 
      	    public static void main(String[] args) {
      	 
      	    	SmartClientFirefoxDriver driver = new SmartClientFirefoxDriver();
      
      			driver.setBaseUrl("http://localhost:8383/login.jsp");
      			//driver.get("isomorphic/system/reference/SmartClient_Explorer.html#nodeTitles");
      			driver.manage().window().maximize();
      
      			By titleInput = ByScLocator.scLocator("//DynamicForm[ID=\"firstSeleniumForm\"]/item[name=firstText||title=Text||index=0|"
                          +"|Class=TextItem]/element");
      			driver.click(titleInput);
      			driver.sendKeys(titleInput, "Success bhaskar" );
      	     
      			System.out.println("Mgr Site Services: Tamara Kane");
      
      			//driver.close();
      			//driver.quit();
      	 
      	            }
      	 
      	    
      }
      Login.jsp below:

      Code:
      <!DOCTYPE html>
      <%@ page contentType="text/html; charset=WINDOWS-1256" pageEncoding="WINDOWS-1256"%> 
      <%@ taglib uri="isomorphic" prefix="isomorphic" %>
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Login - Room</title>
      <isomorphic:loadISC skin="Enterprise"/>
      </head>
      <body>
        
        <script type='text/javascript'>
        
        //isc.say("hii");
      isc.DynamicForm.create({
          width: 400,
          ID:"firstSeleniumForm",
          fields: [
              {title:"Text", ID:"bhaskar",name:"firstText",type:"text", hint: "<nobr>A plain text field</nobr>"},
              {title:"TextArea", type:"textArea"},
             
              {title: "LinkItem", type: "link", name: "link", height: 36, target: "javascript",
               click: "isc.say('Hello world!')", linkTitle: "<br>Click Me<br>"},
              {title: "Checkbox", type: "checkbox", height: 25},
              {title: "Radio Group", type: "radioGroup",
               valueMap: ["Option 1", "Option 2"]}
          ]
      });
      
        </script>
      </body>
      </html>
      And When I am running the login.jsp through tomcat server it is working fine. But If I am running my test case as a Java program then I ma getting the above mentioned error.

      So, How can i mention the SmartClient jars to the test case, So That my test case will run successfully.

      Thanks in advance.

      Comment


        #4
        In your WebDriver sample, you've commented out the "get" command. Calling setBaseUrl() does exactly that - it sets the base URL but doesn't load any page.

        So I'd expect to see something like:
        Code:
        driver.setBaseUrl("http://localhost:8383/");
        driver.get("login.jsp");

        Comment


          #5
          Reg: Finding all fields in a Grid in Selenium Testing

          Thanks for the reply.

          I am able to run the small test case. But Please clarify the below questions:

          I am Using SmartClient.

          1) As we have used javascript for developing the application and for writing test case we are using java , How can i get all the fields from the grid after getting the grid using sclocator.

          2) How can i perform the actions which I was doing using javascript.

          We are working on the below environment:

          SmartClient version : Isomorphic SmartClient/SmartGWT Framework (9.1p_2014-10-26/PowerEdition Deployment 2014-10-26)

          Browser : IE9

          Thanks in advance

          Comment


            #6
            Note that in our testing documentation (http://www.smartclient.com/docs/10.0...tomatedTesting), it's mentioned that we still recommend Selenium V1.0 over WebDriver.

            Are you sure you need to use WebDriver?

            Comment


              #7
              Hi,

              Yes. I wanted to use webdriver because I can't achieve everything using Selenium IDE. SO, Please give me an answers for the above post.

              Comment


                #8
                Note that it's not intended that you would be running automated tests through Selenium IDE if you were using Selenium V1.0. Selenium IDE is a tool used for creating tests - it's not an automation harness. For automated testing of Selenium v1.0, use TestRunner (http://www.smartclient.com/docs/10.0...up..testRunner).

                In the link we referred you to above (http://www.smartclient.com/docs/10.0...tomatedTesting), please note that our official recommendation is that WebDriver be used only for specific situations that Selenium cannot handle (such as file upload). The disadvantages of WebDriver can be found after the text "we continue to recommend Selenium 1.0 rather than WebDriver-based Selenium 2."

                We don't support returning SmartClient objects to Java via our WebDriver classes. The only option really is to use SmartClientWebDriver.assertEval() to execute some JS and verify the result. For example, you could do something like:

                Code:
                smartClientWebDriver.assertEval("var myGrid =
                    isc.AutoTest.getObject(' .... <scLocator for your ListGrid> ...');
                    var record = myGrid.find({SKU: 90600}); 
                    record.unitCost == 0.47", true);
                (We've added newlines to the Java String above for readability. You'll need to remove them before compilation.)
                Last edited by Isomorphic; 6 Nov 2014, 16:35.

                Comment

                Working...
                X