Does Katalon support opening webUI and mobile driver in same script - katalon-studio

We want to execute a automation test case wherein first operations will happen on WebUI and then it will switch to Mobile execution. The process will be done sequentially. I want to write all script in one testcase itself. First script will execute on Chrome browser then in connected mobile device.I am looking for someone who has achieved this in katalon. I need a solution other than test suite collection.

This can be done by using profiles in katalon :
https://docs.katalon.com/katalon-studio/docs/execution-profile-v54.html
Please also remeber that this is not only profilesbut also enviroment (chrome or mobile). You can use this Execution window as example what eviroment i am talking about.

Related

Is there a way to execute google apps script from PostgreSQL or from Bash?

I have hundreds of google spreadsheets which all have the same script in them. I'd like to execute a specific google spreadsheet by ID either from PostgreSQL or from Bash. Is there an easy way to execute scripts? I prefer not having to learn python.
For example, I have spreadsheet id 1HGo8V-P5S-z4oCUiAKULrkZRFlzRHEalJqUFLiP and I'd like to execute function Refresh() via Bash or Postgresql.
Is the API the only route? https://developers.google.com/apps-script/api/how-tos/execute
So far my consideration is to create a python executable and execute it from a postgresql function. https://developers.google.com/apps-script/api/quickstart/python
Edit: It looks like if I want to execute any app script, each spreadsheet would need a google project (manually created). There has to be an easier way to do this, manually creating a project for every spreadsheet doesn't make sense.
Reference: https://developers.google.com/apps-script/api/how-tos/execute
The script being called and the calling application must share a Cloud
Platform project.
Solution:
Deploy web apps is the solution I ended up going with thanks to #Tanaike
You want to execute the container-bound script of Spreadsheet.
You want to execute the script from local PC or outside of Google.
You want to execute the script from Spreadsheet ID.
If my understanding is correct, how about this answer?
Retrieving project IDs of container bound script:
I think that this is the difficult problem in your situation. In the current stage, there are no methods for retrieving the project ID of the container-bound script from the parent Google Docs (in this case, it's Spreadsheet.).
This has already been reported at https://issuetracker.google.com/issues/111149037 as a Feature Request. But unfortunately, this has not been achieved yet.
By this, the project IDs are required to be retrieved manually.
For example, you can retrieve the project IDs at Developer Hub.
When you select a project, you can see the project ID at the URL of https://script.google.com/home/projects/### projectId ###.
From above situation, the project IDs are required to be manually retrieved from each Spreadsheet you want to run the script. I apologize that I couldn't find a workaround for this situation.
Executing script:
I think that there are 2 patterns for executing the script. You can select from 2 patterns.
1. Use the method of scripts.run in Apps Script API
This is also mentioned in your question.
Function in the script is execute using API.
You are required to create only python script at local side.
In this case, the access token retrieved by the OAuth2 process is required at local side.
I think that in this pattern, the script can be simple.
2. Use Web Apps
By accessing to Web Apps, function in the script is execute.
In this case, in order to execute the script, it uses scripts.run in Apps Script API, because of large number of Spreadsheets in your situation. When user accesses to Web Apps, the script of Spreadsheet is executed by the script of Web Apps. Because Google Apps Script is used, the access token can be easily retrieved.
You are required to create a python script for accessing to Web Apps at local side, and Google Apps Script at Google Side (Web Apps).
In this case, you can run the script with and without the access token at local side.
I think that in this pattern, the method of access can be simple.
References:
scripts.run method
Web Apps
Taking advantage of Web Apps with Google Apps Script
If this was not what you want, I apologize.
Edit:
From the discussions, I thought that in the case of your script Refresh(), the following flow is suitable.
1. Deploy Web Apps using the script of Refresh() like an API.
2. Call the API using python script and curl.
By this, the script of Web Apps is run and you can reflect the result of Refresh() for all Spreadsheets.
Sample script:
function doGet() {
var spreadsheets = ["spreadsheetId1", "spreadsheetId2",,,]; // Please set spreadsheet ID here.
for (var i = 0; i < spreadsheets.length; i++) {
SpreadsheetApp.openById(spreadsheets[i])
.getSheetByName("Sheet1") // If you want to also put values to other sheet, please modify this.
.getRange(1, 1)
.setValue(new Date());
}
return ContentService.createTextOutput("Done.");
}
When Web Apps is deployed, the authorization screen is opened. But this authorization is only one time.
Deploy Web Apps:
Before you request to Web Apps, please deploy Web Apps.
On the Script Editor
Publish -> Deploy as Web App
Create new Project version
At "Execute the app a"s, select "Me"
At "Who has access to the app", select "Anyone, even anonymous"
Click "Deploy"
Copy "Current web app URL"
Click "OK"
Curl sample:
If you use curl command, please use as follows.
$ curl -L "https://script.google.com/macros/s/#####/exec"
Note:
When you modified the script, please redeploy Web Apps as new version. By this, the latest script is reflected to Web Apps. This is an important point.
Note:
Also you can use the spreadsheet IDs for requesting and you can directly includ them in Web Apps. (In the sample script, the latter is used.)
If you want to use the spreadsheet IDs for requesting, please be careful. The number of workers for Web Apps is required to be less than 30. Ref

Get WebdriverIO multi-remote to work with Cucumber BDD

I am able to start multiple browser sessions in a single test using WebDriverIO's multiremote with mocha.
Next I'm trying to get WebDriverIO multiremote work with Cucumber BDD. My feature definition is simply to open a browser session and navigate to a url.
Here's my simple WDIO
Problem - the browser opens up but navigation does not occur. I have tried to enable the debugger and observe node-inspector but hasn't helped. What am I missing? Thanks for all the help.
My goal was to conduct multi-user scenario based testing through BDD. Although I haven't been able to resolve this directly via WebDriverIO I found Chimp (which uses WebDriverIO underneath) has its own flavour of session based automation.
Chimp's multi-browser testing does exactly what I wanted. Problem solved!
I'm able to write scenarios such as this without explicitly switching the user context.
Scenario: Able to browse independently
Given Alice goes to "/features"
And Bob go to "/bugs"
Then Alice sees "10" features
And Bob sees "1" bugs

Use protractor for desktop application testing

I have installed application on my desktop.I want to do the automation testing of this application with the use of protractor scripts.Please provide the suggestions.
Depends on what type of application you want to test. ProtractorJS is not the best tool for desktop app testing - since it designed for web-apps.
But if your desktop app built on electronjs - that changes the picture. In this case you can try to use this tutorial - https://github.com/electron/electron/blob/master/docs/tutorial/using-selenium-and-webdriver.md
Protractor provides method .wrapDriver() http://www.protractortest.org/#/api?view=Browser.wrapDriver
So i think you can try to wrap that driver from tutorial into protractor instance and work with it. I never tried that, and unfortunately you should try by your own, since it is not a common use-case of protractor.

Does selenium support IE with google frame add on installed on it?

Selenium is able to load Chrome Frame pages. The problem is that once you load the page in IE with Chrome Frame plugin, the tag appears as empty. Selenium tries to identify elements using the DOM structure, but the way IE and Chrome Frame plugin works, rendering
and DOM tree are taken over by the Chromium code and IE gets an empty DOM.
So i guess, selenium doesn't support IE with google frame add-on installed on it?
Has anyone worked around this problem?
Thanks
This question has been asked and answered on the Selenium user's mailing list. The IE driver doesn't work with the Google Chrome Frame add-on, and there are no plans to implement support for it to work with the Chrome Frame add-on. Either you want to test the operation of your website under Chrome (in which case you should use the ChromeDriver), or you want to test it under IE (in which case you should use the IE driver). If you can point to a specific case where using the website with the Chrome Frame add-on behaves differently than the way it behaves with the Chrome standalone browser, you might be able to make a case to revisit the issue. Furthermore, remember that Selenium is an Open Source project, and you are welcome to make changes and submit patches to the code at any time.
Watir WebDriver has the same issue.
Selenium core, the part that loads in the target browser and executes tests does work and can be run independently. So, if you have a Selenium test suite in HTML form, it can be run in GCF using the following steps:
Configure a web server to opt all URLs into chrome frame using HTTP header as described here: http://www.chromium.org/developers/how-tos/chrome-frame-getting-started#TOC-Making-Your-Pages-Work-With-Google-
Host your test suite under '/tests' folder on this web server. Lets say the suite is my_test_suite.html.
Host the selenium core folder as the '/core' on the server
Now restart the server.
Run the suite with this URL: http:///core/TestRunner.html?test=tests/my_test_suite.html&auto=true

How to suppress display of password in Selenium RC window

I am writing some Selenium RC tests using the perl library WWW::Selenium. At the beginning of the test I need to login to a web form using my username and password.
I noticed that my password is displayed in the Selenium Remote Control "Command History" window as type(password, secret).
Is there any way to suppress the display of the password? Maybe there is a command other than type I can use?
Unfortunately no. You could go into the Selenium core and change it to show ******* when it finds a field named password.
Beware though that this could make life difficult when debugging
I guess we can do this using native methods support.
Think logically every native methods in selenium will be sent to the operating system not to the browser.
So if you use any of the native methods, the flow is like this:
Client Program ----> Selenium RC server ----> to the operating system (in Java this is done using Robot Class)
But all the other non-native methods flow is like this:
Client Program ----> Selenium RC server ----> to the Browser
So, the Command History window operates at the Browser level and the native methods will not reach there.
Here is the code:
selenium.focus("locator");
selenium.keyPressNative("key code"); // this will not be shown in command history
Here the key code is only for one character and if you want string (more than one character), we should rely on our client program to implement the logic.
I have given that code in my previous answers to other posts. If you need it personalised post our exact requirement so that I can give that code tailored to your need.