selenium

How can I make Selenium run in parallel with Scrapy?

安稳与你 提交于 2021-02-19 06:05:04
问题 I'm trying to scrape some urls with Scrapy and Selenium. Some of the urls are processed by Scrapy directly and the others are handled with Selenium first. The problem is: while Selenium is handling a url, Scrapy is not processing the others in parallel. It waits for the webdriver to finish its work. I have tried to run multiple spiders with different init parameters in separate processes (using multiprocessing pool), but I got twisted.internet.error.ReactorNotRestartable . I also tried to

Why is my containerized Selenium application failing only in AWS Lambda?

懵懂的女人 提交于 2021-02-19 05:53:47
问题 I'm trying to get a function to run in AWS Lambda that uses Selenium and Firefox/ geckodriver in order to run. I've decided to go the route of creating a container image, and then uploading and running that instead of using a pre-configured runtime. I was able to create a Dockerfile that correctly installs Firefox and Python, downloads geckodriver , and installs my test code: FROM alpine:latest RUN apk add firefox python3 py3-pip RUN pip install requests selenium RUN mkdir /app WORKDIR /app

Failed loading config.ts due to import protractor

筅森魡賤 提交于 2021-02-19 05:48:22
问题 I am trying to start a new protractor project to test an angular site. I installed node.js, typescript, protractor globally and jasmine. I go to the project folder and do webdriver-manager update . Then I do webdriver-manager start . I also build the config.ts using tsc config.ts . Everything works fine until i try protractor config.ts . Here i will provide my config.ts and my package.json. { "name": "protractortests", "version": "1.0.0", "description": "Automated tests for a game platform",

Difference between JsonWireProtocol mechanisms and the new standards in W3C Living Document when using Selenium

强颜欢笑 提交于 2021-02-19 05:34:21
问题 I'm wondering what are the differences between the mechanisms in JsonWireProtocol ( Status: OBSOLETE ) and W3C Living Document from 31 December 2019 ( the new standard ) when using Selenium for UI tests. I know that Selenium have used the following: When we make a new instance of a driver (C#): using OpenQA.Selenium; using OpenQA.Selenium.Chrome; IWebDriver driver = new ChromeDriver(); we actually make a POST /session request to the selenium server. After that via JsonWireProtocol and, in

Exception while taking screenshot null and FAILED CONFIGURATION: @AfterMethod teardown

拥有回忆 提交于 2021-02-19 05:24:45
问题 I am facing some trouble and got stuck since yesterday; unable to figure out the cause for it. Tried solution of answers here. I created @Test, with sample of code to login and check dashaboard of application. and @AfterMethod, for when Assert is false, should capture a screenshot. If i comment the Aftermethod code it works fine without any issue; It used to run fine w/o any problem earlier. Could you please help me in finding some solution. (it may be very small thing for you.. but pls do

How to print the text using a locator from the span in selenium webdriver python?

别等时光非礼了梦想. 提交于 2021-02-19 04:59:33
问题 I am using the selenium for UI testing. I have below inspect element of chrome browser. <div tabindex="-1" unselectable="on" role="gridcell" comp-id="2815" col-id="StartBaseMV" class="ag-cell ag-cell-not-inline-editing ag-cell-with-height cell-number ag-cell-value" style="width: 120px; left: 2020px; text-align: right; "> <span> <span class="ag-value-change-delta"></span> <span class="ag-value-change-value">($5,281,158)</span> </span> </div> What I tried for writing xpath. //div[@col-id=

Limiting the number of parallel tests with ThreadCount TestNG

醉酒当歌 提交于 2021-02-19 04:29:08
问题 I have a head scratcher here and I do not know how to handle this. I have several test classes that run via xml. Around 90 test classes, each with about 10+ @Test steps inside them. I have a selenium grid configued, with a maxSession=5 so no more than 5 parallel browser instances can run parallel on a single node. Heres the part I do NOT understand. Lets say I kick off this xml file with all of these test classes, I set my thread-count=10 hoping that 10 tests will kick off at a time. What

Calling a function in a JavaScript file with Selenium IDE

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-19 04:19:38
问题 So, I'm running these Selenium IDE tests against a site I'm working on. Everything about the tests themselves is running fine, except I would like to do a bit of clean-up once I'm done. In my MVC3 Razor based site, I have a JavaScript file with a function that gets a JsonResult from a Controller of mine. That Controller handles the database clean-up that Selenium IDE otherwise couldn't handle. However, I'm having a hard time finding any sort of documentation on how to do this. I know I can do

Selenium Webdriver - how to close the first pop up window and go to the actual page

旧巷老猫 提交于 2021-02-19 04:13:54
问题 I'm trying to automate the webpage "http://www.quikr.com",when I open this you will get a pop up window first saying "Please Choose Your Location" then after closing it , I can see the main page of quikr. I tried closing that Popup page by automation ,but not able to do Tried using xpath driver.findElement(By.xpath("//*[@id='csclose']/strong")).click(); Tried using className driver.findElement(By.className("cs-close cs-close-v2")).click(); Tried using id driver.findElement(By.id("csclose"))

Selenium Webdriver - how to close the first pop up window and go to the actual page

空扰寡人 提交于 2021-02-19 04:13:17
问题 I'm trying to automate the webpage "http://www.quikr.com",when I open this you will get a pop up window first saying "Please Choose Your Location" then after closing it , I can see the main page of quikr. I tried closing that Popup page by automation ,but not able to do Tried using xpath driver.findElement(By.xpath("//*[@id='csclose']/strong")).click(); Tried using className driver.findElement(By.className("cs-close cs-close-v2")).click(); Tried using id driver.findElement(By.id("csclose"))