automation

How to introduce custom variable(s) inside driver.execute_script(<HERE>)?

寵の児 提交于 2021-01-07 06:31:21
问题 For a web driver we can execute JavaScript code which includes custom variable like this: driver.execute_script("alert('%s')" % variable) # an example introducing variable in alert() But what to do if I need to modify the content of the variable where I have to write the variable inside the script? More specifically, I am facing the following problem: driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") Here in this code, I have to write the document.body.scrollHeight

Testng get parallel execution method logs separately

淺唱寂寞╮ 提交于 2021-01-07 03:13:20
问题 I have used onTestSuccess, OnTestFailure for Test case execution results. I am able to report my Test case is pass or fail. if (result.getStatus() == ITestResult.SUCCESS) { // } else if (result.getStatus() == ITestResult.FAILURE) { // }else if (result.getStatus() == ITestResult.SKIP) { // } But I also need to capture logs for each method separately.. that should not overlapping with other thread logs. @Test public void test001() throws IOException { System.out.println("Test001"); } @Test

How to pass default parser in REST Assured?

落花浮王杯 提交于 2021-01-06 16:31:11
问题 I am trying to Automate API using REST Assured. Below is the Error I got in during executing the API Test Case :- testNotifications(com.api.truValue.test.notifications.NotificationsTest) Time elapsed: 1.832 sec <<< FAILURE! java.lang.IllegalStateException: Cannot invoke the path method because no content-type was present in the response and no default parser has been set. You can specify a default parser using e.g.: RestAssured.defaultParser = Parser.JSON; at com.api.truValue.test

How to pass default parser in REST Assured?

泪湿孤枕 提交于 2021-01-06 16:18:32
问题 I am trying to Automate API using REST Assured. Below is the Error I got in during executing the API Test Case :- testNotifications(com.api.truValue.test.notifications.NotificationsTest) Time elapsed: 1.832 sec <<< FAILURE! java.lang.IllegalStateException: Cannot invoke the path method because no content-type was present in the response and no default parser has been set. You can specify a default parser using e.g.: RestAssured.defaultParser = Parser.JSON; at com.api.truValue.test

How to locate web elements with similar attributes [duplicate]

馋奶兔 提交于 2021-01-06 00:07:13
问题 This question already has answers here : Can selenium recognize aria-uuid as an ID for object recognition? (2 answers) Vba - webscraping using ng-click (4 answers) Find an element where data-tb-test-id attribute is present instead of id using Selenium and Python (3 answers) Closed 2 days ago . I am performing automation on a web page, the problem is i cannot locate a web element because it has identical attributes to that of other 20 web elements with similar parents and children, with one

How to locate web elements with similar attributes [duplicate]

烈酒焚心 提交于 2021-01-05 23:56:58
问题 This question already has answers here : Can selenium recognize aria-uuid as an ID for object recognition? (2 answers) Vba - webscraping using ng-click (4 answers) Find an element where data-tb-test-id attribute is present instead of id using Selenium and Python (3 answers) Closed 2 days ago . I am performing automation on a web page, the problem is i cannot locate a web element because it has identical attributes to that of other 20 web elements with similar parents and children, with one

Download audit logs in csv from azure DevOps UI using powershell

半世苍凉 提交于 2021-01-02 04:05:01
问题 Hi I am looking for a script which can download export logs in csv from azure DevOps using powershell for given time frame. like I can enter time frame and then script will download and return csv file from azure DevOps ui - I found this script here https://developercommunity.visualstudio.com/content/problem/615053/question-we-want-to-get-the-export-audit-log-using.html I am not sure what username , password and url to use here $Username = 'domain\user' $Password = 'password' $Url = "https:/

Download audit logs in csv from azure DevOps UI using powershell

南笙酒味 提交于 2021-01-02 04:00:01
问题 Hi I am looking for a script which can download export logs in csv from azure DevOps using powershell for given time frame. like I can enter time frame and then script will download and return csv file from azure DevOps ui - I found this script here https://developercommunity.visualstudio.com/content/problem/615053/question-we-want-to-get-the-export-audit-log-using.html I am not sure what username , password and url to use here $Username = 'domain\user' $Password = 'password' $Url = "https:/

VBA download file from website - popup window

邮差的信 提交于 2021-01-01 08:40:13
问题 I am trying to automate a file downloading from a website. When I do the download manually, all I have to do is to click on the "save" icon (floppy disk), then another window pops up for a second and the download begins (while the popped up window disappears). What I usually do (when I automate a download) is to find the files URL, then I use the URLDownloadToFile function. But in this case I cannot find the url in the html. I tried to use the .click and FireEvent on the object but nothing

VBA download file from website - popup window

被刻印的时光 ゝ 提交于 2021-01-01 08:38:09
问题 I am trying to automate a file downloading from a website. When I do the download manually, all I have to do is to click on the "save" icon (floppy disk), then another window pops up for a second and the download begins (while the popped up window disappears). What I usually do (when I automate a download) is to find the files URL, then I use the URLDownloadToFile function. But in this case I cannot find the url in the html. I tried to use the .click and FireEvent on the object but nothing