Dinamic Page c#

47 views
Skip to first unread message

Tomás

unread,
Jan 13, 2023, 5:23:23 AM1/13/23
to Selenium Users
Hi.

I have a problem with dinamic page selenium in c#
The main page has a table with data, (Products  = old data)  in this table I can doubleclick in each elements

When I double click via

 foreach (var elements in ielements) {
 builder.DoubleClick(elements).Build().Perform()
}


the page change in the same place with the result of double click (product = new data)
But I cant access via driver .FindElement because I think driver has the information  of ( Products = old Data).

I sent an attach to explain better.

Thank You


data.PNG

Tomás

unread,
Jan 16, 2023, 3:21:13 AM1/16/23
to Selenium Users
Hi,
Isn't there anybody to know what could happen with this issue? Maybe I didn't explain well.
If you see necessary more explanation, I'll be trying to explain better

Kind Regards

Tomás

unread,
Jan 17, 2023, 6:39:00 AM1/17/23
to Selenium Users
I continue doing testing to solve my issue, I've changed to selenium firefox, and I've tried to wait load the page but doesn't work, but I'm seeing on  firebox the id that I'm trying to find on selenium, but selenium could no find it. I don't know if I'm doing something bad or there is  some bug.
Furthermore, I post two screenshots if someone occurs something
There is one detail on exception, the id selenium can't  find is #ContentPlaceHolder1_Objeto_FormPanel\-innerCt , but the right id  set in code is ContentPlaceHolder1_Objeto_FormPanel-innerCt, the exception element adds character "\"
 
firefox.PNG
code.PNG

Adrian

unread,
Jan 17, 2023, 3:11:28 PM1/17/23
to Selenium Users
Hi,
Try changing your search.  Sometimes I have trouble searching by id as well.  It's a scoping issue, some people move to an iframe first and then do a search and that fixes the problem.

Try this xpath search in your wait instead: 
By.XPath("//div[@id='ContentPlaceHolder1_Objeto_FormPanel\-innerCt']")

Cheers,
Adrian.

Jessica Wikholm

unread,
Feb 5, 2023, 1:21:37 AM2/5/23
to Selenium Users
If the DoubleClick() is opening a new tab or window, you will need to swap to the newly opened tab/window before your Wait.Until(). Working with windows and tabs | Selenium.

Another selector to try By.CssSelector("div[id=ContentPlaceHolder1_Objeto_FormPanel-innerCt]") or By.CssSelector("div[id='ContentPlaceHolder1_Objeto_FormPanel-innerCt']").
Reply all
Reply to author
Forward
0 new messages