selenium-webdriver

“NoSuchSessionError: This driver instance does not have a valid session ID” when running a simple Selenium Runner test

萝らか妹 提交于 2021-01-19 05:27:11
问题 I just installed the latest version of Selenium Runner npm install -g selenium-side-runner on my Mac High Sierra. I'm running node v14.1.0. I'm using Chrome Driver v 83. I want to run a very simple file that simply opens a page, waiting for an element on that page to be present. However, I'm getting a "NoSuchSessionError: This driver instance does not have a valid session ID" error. The Selenium Runner .side file in question is $ cat selenium/KarmaDecayGetResults.side { "id": "9664bd47-b18f

“NoSuchSessionError: This driver instance does not have a valid session ID” when running a simple Selenium Runner test

天大地大妈咪最大 提交于 2021-01-19 05:26:57
问题 I just installed the latest version of Selenium Runner npm install -g selenium-side-runner on my Mac High Sierra. I'm running node v14.1.0. I'm using Chrome Driver v 83. I want to run a very simple file that simply opens a page, waiting for an element on that page to be present. However, I'm getting a "NoSuchSessionError: This driver instance does not have a valid session ID" error. The Selenium Runner .side file in question is $ cat selenium/KarmaDecayGetResults.side { "id": "9664bd47-b18f

“NoSuchSessionError: This driver instance does not have a valid session ID” when running a simple Selenium Runner test

和自甴很熟 提交于 2021-01-19 05:26:34
问题 I just installed the latest version of Selenium Runner npm install -g selenium-side-runner on my Mac High Sierra. I'm running node v14.1.0. I'm using Chrome Driver v 83. I want to run a very simple file that simply opens a page, waiting for an element on that page to be present. However, I'm getting a "NoSuchSessionError: This driver instance does not have a valid session ID" error. The Selenium Runner .side file in question is $ cat selenium/KarmaDecayGetResults.side { "id": "9664bd47-b18f

Unable to access the remaining elements by xpaths in a loop after accessing the first element- Webscraping Selenium Python

本小妞迷上赌 提交于 2021-01-14 23:42:08
问题 Im trying to scrape data from sciencedirect website. Im trying to automate the scarping process by accessing the journal issues one after the other by creating a list of xpaths and looping them. when im running the loop im unable to access the rest of the elements after accessing the first journal. This process worked for me on another website but not on this. I also wanted to know is there any better way to access these elements apart from this process. #Importing libraries import requests

Unable to access the remaining elements by xpaths in a loop after accessing the first element- Webscraping Selenium Python

老子叫甜甜 提交于 2021-01-14 23:40:51
问题 Im trying to scrape data from sciencedirect website. Im trying to automate the scarping process by accessing the journal issues one after the other by creating a list of xpaths and looping them. when im running the loop im unable to access the rest of the elements after accessing the first journal. This process worked for me on another website but not on this. I also wanted to know is there any better way to access these elements apart from this process. #Importing libraries import requests

Unable to type within username field within ProtonMail signup page using Selenium and Python

那年仲夏 提交于 2021-01-13 09:42:42
问题 Hi I was trying to type the username field using Selenium and Python for the website https://mail.protonmail.com/create/new?language=en. From the developer tool, I am able to inspect the item using CSSSelector/Xpath or other way. But when I am running the pthon script its not working. Screenshot attached: My code is like the following: BASE_URL = 'https://mail.protonmail.com/create/new?language=en' driver = webdriver.Chrome(executable_path='./drivers/chromedriver') driver.get(BASE_URL) river

How to open a link in a new tab with python and selenium

主宰稳场 提交于 2021-01-07 03:14:12
问题 I want to open links that I find on a website in a new tab. I have tried to open a new tab and pass the url of the link to the driver as suggested here, however, the new tab simply will not open. (There are a couple of other suggestion for how to open a new tab, but none of them seem to work for me.) So my latest attempt was to right-click the link and press "t" to open the link in a new tab, like so: from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium

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

Using permanent profiles and cookies in Selenium

瘦欲@ 提交于 2021-01-07 03:10:09
问题 I have a Django website and I'm using Selenium. I want to have one or two permanent profiles with Chrome or Firefox, to check that users remain logged in for example after I upgrade Django and then users login from another profile/session (the default is not to remain logged in, but I patched Django to remain logged in). For this I need permanent profiles and cookies. I want to login once, and then check that I'm still logged in the next time I run Selenium tests. I searched and found out

Using permanent profiles and cookies in Selenium

北战南征 提交于 2021-01-07 03:09:12
问题 I have a Django website and I'm using Selenium. I want to have one or two permanent profiles with Chrome or Firefox, to check that users remain logged in for example after I upgrade Django and then users login from another profile/session (the default is not to remain logged in, but I patched Django to remain logged in). For this I need permanent profiles and cookies. I want to login once, and then check that I'm still logged in the next time I run Selenium tests. I searched and found out