[英]selenium webdriver get from partial url in python
我想從部分 url 獲取 driver.get ,例如:通常我們這樣做:
driver.get('www.dummy.com/event/rocknroll/1234')
但現在我不知道事件名稱所以有什么辦法可以做這樣的事情:
driver.get('www.dummy.com/event/*/1234')
謝謝
根據我的理解,這是行不通的,因為get
方法需要一個字符串作為參數。
從文檔,
void get(String url);
/**
* Get a string representing the current URL that the browser is looking at.
*
* @return The URL of the page currently loaded in the browser
*/
但是,您是否嘗試過為此進行一些虛擬測試來訪問 url?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.