selenium

For scrapy/selenium is there a way to go back to a previous page?

一世执手 提交于 2021-02-05 20:22:37
问题 I essentially have a start_url that has my javascript search form and button, hence the need of selenium. I use selenium to select the appropriate items in my select box objects, and click the search button. The following page, I do some scrapy magic. However, now I want to go BACK to the original start_url and fill out a different object, etc. and repeat until no more. Essentially, I have tried making a for-loop and trying to get the browser to go back to the original response.url, but

what are the differences (and when to use) selenium-webdriver over webdriverjs?

倾然丶 夕夏残阳落幕 提交于 2021-02-05 13:57:36
问题 I'm an experience professional that uses selenium-webdriver. I'm exploring more options on how to test javascript applications and I found webdriverJs. Unfortunately, I dont understand what's the difference between these two (2). Can someone please explain when to use selenium-webdriver over webdriverJs and the benefits? Thanks! 回答1: WebDriverJS and selenium-webdriver are both JavaScript bindings for the Webdriver API. The only difference is that selenium-webdriver is the official

what are the differences (and when to use) selenium-webdriver over webdriverjs?

徘徊边缘 提交于 2021-02-05 13:54:24
问题 I'm an experience professional that uses selenium-webdriver. I'm exploring more options on how to test javascript applications and I found webdriverJs. Unfortunately, I dont understand what's the difference between these two (2). Can someone please explain when to use selenium-webdriver over webdriverJs and the benefits? Thanks! 回答1: WebDriverJS and selenium-webdriver are both JavaScript bindings for the Webdriver API. The only difference is that selenium-webdriver is the official

How To Run Selenium With Chrome In Docker

怎甘沉沦 提交于 2021-02-05 13:13:10
问题 I installed google-chrome in a Docker, but when I run my Python 2 script of Selenium, it failed like this: automation@1c17781fef0c:/topology-editor/test$ python test.py Traceback (most recent call last): File "test.py", line 27, in <module> browser = webdriver.Chrome() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__ desired_capabilities=desired_capabilities) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote

How To Run Selenium With Chrome In Docker

我是研究僧i 提交于 2021-02-05 13:12:19
问题 I installed google-chrome in a Docker, but when I run my Python 2 script of Selenium, it failed like this: automation@1c17781fef0c:/topology-editor/test$ python test.py Traceback (most recent call last): File "test.py", line 27, in <module> browser = webdriver.Chrome() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__ desired_capabilities=desired_capabilities) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote

Difference between webdriverjs and webdriverio

ぐ巨炮叔叔 提交于 2021-02-05 13:11:18
问题 I am trying to choose a tool for Javascript automation tests. Until now I used Selenium WebDriver in Java with TestNG to build my tests, but I have been asked to search for JavaScript solution to write tests. Of course the first thing on my mind was to move to WebDriverJs - it should be similar to my Java tests. But, I also found another framework: WebdriverIO. I could not find anything that could be done with WebdriverIO that is not possible with WebDriverJs. Please help me to understand the

Null Pointer Exception when trying to take a screenshot with selenium [duplicate]

江枫思渺然 提交于 2021-02-05 12:29:46
问题 This question already has answers here : What is a NullPointerException, and how do I fix it? (12 answers) Closed 4 years ago . I have wrote a Java Class which uses selenium webdriver to quickly pass through a website and test various functions. I have also wrote a seperate class which will be used to execute the takeScreenshot() method. Once the test hits the code which executes the screenshot method, the browser closes and the J-Unit test fails and points to the line where I am calling the

Python Selenium - How can I click on the third last element from a group of elements in a table?

半世苍凉 提交于 2021-02-05 12:18:29
问题 Good day everyone, Can someone explain to me how I cant get the number of elements in a table? I am running through multiple tables that all have different lengths and I always need the 3rd last item. I have the xpath of the table that contains those . Using Selenium's Python API - How do I get the number of rows in a table? I found this answer and some other answers that seem to answer my question, but to be honest: At this point I just dont understand how to implement this into my code. I

WebScraping javascript page in python

穿精又带淫゛_ 提交于 2021-02-05 12:16:21
问题 Hello World, New in Python, I am trying to webscrape a javascript page : https://search.gleif.org/#/search/ Please find below the result from my code (using request) <!DOCTYPE html> <html> <head><meta charset="utf-8"/> <meta content="width=device-width,initial-scale=1" name="viewport"/> <title>LEI Search 2.0</title> <link href="/static/icons/favicon.ico" rel="shortcut icon" type="image/x-icon"/> <link href="https://fonts.googleapis.com/css?family=Open+Sans:200,300,400,600,700,900&subset

How to replace innerHTML code using Selenium Webdriver C#?

Deadly 提交于 2021-02-05 12:13:05
问题 HTML CODE: <select name="ddlFruit" id="ddlFruit" class="Searchddl"> <option value="">Select</option> <option value="447">Grapes</option> <option value="448">Mango</option> <option selected="selected" value="449">Apple</option> </select> How can i replace selected="selected" to other options using selenium webdriver. Eg: <select name="ddlFruit" id="ddlFruit" class="Searchddl"> <option value="">Select</option> <option selected="selected" value="447">Grapes</option> <option value="448">Mango<