cancel
Showing results for 
Search instead for 
Did you mean: 

JAVA jar files need to execute in SAPUI5

Former Member
0 Kudos

Hi Team

     JAVA jar files need to execute in SAPUI5 project.

     How can we do . kindly do need ful

    Please suggestion and help...

Regards

Kamal.M

Accepted Solutions (0)

Answers (2)

Answers (2)

Khairwa
Explorer
0 Kudos

Hi Kamal,

    Where you want to put java jar files & purpose for this in your SAPUI5 Project.

regards,

Kherwa

Former Member
0 Kudos

Hi Rajesh,

I want execute the selenuim test script in SAPUI5 project.

Regards

Kamal.M

Khairwa
Explorer
0 Kudos

where you want selenium scripts to run. i.e. on client side or server side.

regards,

Kherwa

Former Member
0 Kudos

I want run in server side .

Regards

Kamal.M

Former Member
0 Kudos

Actually I am trying to develop an UI5 web application to do automated testing
based on selenium jars. I kept those jars in lib folder of Web-Inf. When I tried using a class present in that lib it throws some error.

Here are some screenshots.

Suggest some ways to use those libraries.



Thanks

Kamal.M

Khairwa
Explorer
0 Kudos

you can't directly use those classes, as they are not on client side.

you have to create java resource on server side to use them & then call that java resource from client side.

regards,

kherwa

Former Member
0 Kudos

How will we do??. Pls give me one example

Regards

Kamal.M

Khairwa
Explorer
0 Kudos

If you want it on client side,

This documentation is available from selenium,

Link: WebDriverJs · SeleniumHQ/selenium Wiki · GitHub

Working in a Browser

In addition to node, WebDriverJS may also be used directly in the browser. To compile the browser module, which has a smaller set of dependencies than node, run:

% ./go //javascript/webdriver:webdriver 

The WebDriverJS client must be used with the Selenium server. Just as with node, you can create a WebDriver instance using the webdriver.Builder class:


<!DOCTYPE html> <script src="webdriver.js"></script>

<script>

var driver = new webdriver.Builder().

                 usingServer('http://localhost:4444/wd/hub').

                 withCapabilities(webdriver.Capabilities.chrome()).

                 build();

driver.get('http://www.google.com');

driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');

driver.findElement(webdriver.By.name('btnG')).click();

driver.getTitle().then(function(title) {

if (title !== 'webdriver - Google Search') {

     throw new Error(

'Expected "webdriver - Google Search", but was "' + title + '"');

}

});

driver.quit();

</script>

Regards,

Kherwa

Former Member
0 Kudos

Thanks Rajesh . I will check and update..

Regards

Kamal.M

former_member182862
Active Contributor
0 Kudos

We have two questions on the topic for this week 🙂

Hi Kamal

Can you share more information on what you want to do here. SAPUI5 is using javascript and how do you want to execute java classes?

Thanks

-D

Former Member
0 Kudos

Hi Dennis Seah,

Thanks for your reply.

Yes. I want to execute the java classes in SAPUI5 Project. Kindly help.

Thanks

Kamal.M

Former Member
0 Kudos

Actually I am trying to develop an UI5 web application to do automated testing
based on selenium jars. I kept those jars in lib folder of Web-Inf. When I tried using a class present in that lib it throws some error.

Here are some screenshots.

Suggest some ways to use those libraries.



Regards

Kamal.M

Khairwa
Explorer
0 Kudos

you can't directly use those classes, as they are not on client side.

you have to create java resource on server side to use them.

regards,

kherwa