selenium

Selenium: how to handle JNLP issue in Chrome and Python

两盒软妹~` 提交于 2021-02-05 09:29:17
问题 In Chrome (Edge or Firefox) JNLP warning This type of file can harm your computer popups when I try to open web page containing this Java extension with Selenium WebDriver. There are 2 buttons - Keep to allow proceeding and Discard to...discard. The warning forbid any other action because it's probably not possible to allow JNLP and run its installation from browser via Selenium itself. One possible solution is to use different browser (or retired browser like IE) or to use some workaround,

How to print the partial text from an element using Selenium and Python

安稳与你 提交于 2021-02-05 09:27:45
问题 I am trying to get the text "Album Vol.1 [Every letter I sent you] LP (Normal Edition)" from http://www.ktown4u.com/iteminfo?grp_no=231307&goods_no=44363#dt_wrap01 under the description tab but I keep getting this error message. selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":".//div[@class='view_body']/div[2]/span"} Different variations give me similar error messages. driver.find_element_by_css_selector('

Can you help me use Selenium to click Add To Cart button?

柔情痞子 提交于 2021-02-05 09:26:57
问题 I am trying to do a tutorial and learn Selenium in python however i cant seem to get Selenium to click the "Add To Cart" button using either find_element_by_class or find_element_by_XPATH. The problem is to check if the item is out of stock, and if it is out of stock then to refresh the webpage and restart the script. If the item is in stock then it should click "Add To Cart" I am using: Python v3.9 Chrome v87 This is the URL i am practicing on: https://www.currys.co.uk/gbuk/tv-and-home

Selenium get String value from Div OnClick element

吃可爱长大的小学妹 提交于 2021-02-05 09:11:39
问题 Im trying to get the email address from the following code but im not sure how to do it. Any help would be appreciated <div class="taLnk hvrIE6 fl" onclick="ta.trackEventOnPage('Listing', 'Email', 7741695, 1); return ta.call('ta.locationDetail.checkEmailAction',event,this,'info@email.com', 7741695, '\x41\x6e\x20\x69\x6e\x71\x75\x69\x72\x79\x20\x66\x72\x6f\x6d\x20\x61\x20\x54\x72\x69\x70\x41\x64\x76\x69\x73\x6f\x72\x20\x75\x73\x65\x72\x20\x66\x6f\x72\x20\x41\x6e\x6e\x61\x4c\x65\x6e\x61',

WebDriverException: Session not available and is not among the last 1000 terminated sessions with GeckoDriver and Firefox in SeleniumGrid

此生再无相见时 提交于 2021-02-05 09:10:38
问题 Problem When I execute 2 nodes of Firefox with 1 instance each no problem. But if I execute with 3 or more than 3 nodes getting the below error. No Problem if I execute 100 Test cases in chrome but seems Firefox not able to handle so many test cases. I have high config server with 64 GB RAM. I also observed, with 3 nodes the consumption of memory is never goes beyond 70% HUB java -jar selenium-server-standalone-3.14.0.jar -role hub -browserTimeout 30 -timeout 90 Node java -Dwebdriver.gecko

Selenium get String value from Div OnClick element

大憨熊 提交于 2021-02-05 09:10:14
问题 Im trying to get the email address from the following code but im not sure how to do it. Any help would be appreciated <div class="taLnk hvrIE6 fl" onclick="ta.trackEventOnPage('Listing', 'Email', 7741695, 1); return ta.call('ta.locationDetail.checkEmailAction',event,this,'info@email.com', 7741695, '\x41\x6e\x20\x69\x6e\x71\x75\x69\x72\x79\x20\x66\x72\x6f\x6d\x20\x61\x20\x54\x72\x69\x70\x41\x64\x76\x69\x73\x6f\x72\x20\x75\x73\x65\x72\x20\x66\x6f\x72\x20\x41\x6e\x6e\x61\x4c\x65\x6e\x61',

WebDriverException: Session not available and is not among the last 1000 terminated sessions with GeckoDriver and Firefox in SeleniumGrid

混江龙づ霸主 提交于 2021-02-05 09:08:59
问题 Problem When I execute 2 nodes of Firefox with 1 instance each no problem. But if I execute with 3 or more than 3 nodes getting the below error. No Problem if I execute 100 Test cases in chrome but seems Firefox not able to handle so many test cases. I have high config server with 64 GB RAM. I also observed, with 3 nodes the consumption of memory is never goes beyond 70% HUB java -jar selenium-server-standalone-3.14.0.jar -role hub -browserTimeout 30 -timeout 90 Node java -Dwebdriver.gecko

WebDriverException: Session not available and is not among the last 1000 terminated sessions with GeckoDriver and Firefox in SeleniumGrid

試著忘記壹切 提交于 2021-02-05 09:08:09
问题 Problem When I execute 2 nodes of Firefox with 1 instance each no problem. But if I execute with 3 or more than 3 nodes getting the below error. No Problem if I execute 100 Test cases in chrome but seems Firefox not able to handle so many test cases. I have high config server with 64 GB RAM. I also observed, with 3 nodes the consumption of memory is never goes beyond 70% HUB java -jar selenium-server-standalone-3.14.0.jar -role hub -browserTimeout 30 -timeout 90 Node java -Dwebdriver.gecko

WebDriverException: Session not available and is not among the last 1000 terminated sessions with GeckoDriver and Firefox in SeleniumGrid

a 夏天 提交于 2021-02-05 09:04:37
问题 Problem When I execute 2 nodes of Firefox with 1 instance each no problem. But if I execute with 3 or more than 3 nodes getting the below error. No Problem if I execute 100 Test cases in chrome but seems Firefox not able to handle so many test cases. I have high config server with 64 GB RAM. I also observed, with 3 nodes the consumption of memory is never goes beyond 70% HUB java -jar selenium-server-standalone-3.14.0.jar -role hub -browserTimeout 30 -timeout 90 Node java -Dwebdriver.gecko

Selenium Tests take several minutes to start when loading a profile

試著忘記壹切 提交于 2021-02-05 08:59:09
问题 I am just trying to figure out if anyone else has seen their Selenium tests run significantly slower (takes 2+ minutes to start) when they load a profile into the FirefoxDriver as shown in: Selenium a default profile for the Firefox The question originator of the above post mentioned this issue in a comment, but never updated whether he fixed this slowness issue. At some point my tests stopped running all together and I started getting the error org.openqa.selenium.WebDriverException: java.io