问题
we are going to scrape data from the below site https://ras.arbitr.ru
Step:
1.Load the webpage
2.Click the View button [Left panel]
3.To verify the search result loaded in the right-side panel or not?
Normal click from the web browser's working perfectly, when I try to click from the web driver it's not loading the result.
I'm using the below attributes to click the view button
using the ID
Using button caption
Using CSS selector
Click using Javascript
Using Keyboard event
Code:
WebUI.openBrowser('')
WebUI.navigateToUrl('https://ras.arbitr.ru/')
WebDriver driver = DriverFactory.getWebDriver()
WebElement viewButton = driver.findElement(By.cssSelector("div#b-form-submit>div button[alt='Найти']"))
viewButton.click()
//viewButton -//*[@id="b-form-submit"]/div/button
//viewButton - "//button[contains(text(),'Найти')]"
from the web driver click event-triggered but the search result not showing on the right-side panel.
It's perfectly working to do the same steps in web browsers.
来源:https://stackoverflow.com/questions/65774494/data-scraping-using-selenium-unable-to-find-the-search-result